diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse')
16 files changed, 109 insertions, 109 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ByteArrayTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ByteArrayTransfer.java index 6620e7491a..e8baa38ac0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ByteArrayTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ByteArrayTransfer.java @@ -155,7 +155,7 @@ protected void javaToNative (Object object, TransferData transferData) { } byte[] buffer = (byte[])object; if (buffer.length == 0) return; - int /*long*/ pValue = OS.g_malloc(buffer.length); + long /*int*/ pValue = OS.g_malloc(buffer.length); if (pValue == 0) return; OS.memmove(pValue, buffer, buffer.length); transferData.length = buffer.length; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java index 541830fd9e..7b3f563481 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java @@ -32,14 +32,14 @@ public class Clipboard { private Display display; - static int /*long*/ GTKCLIPBOARD; - static int /*long*/ GTKPRIMARYCLIPBOARD; - private static int /*long*/ TARGET; + static long /*int*/ GTKCLIPBOARD; + static long /*int*/ GTKPRIMARYCLIPBOARD; + private static long /*int*/ TARGET; static { GTKCLIPBOARD = OS.gtk_clipboard_get(OS.GDK_NONE); byte[] buffer = Converter.wcsToMbcs(null, "PRIMARY", true); - int /*long*/ primary = OS.gdk_atom_intern(buffer, false); + long /*int*/ primary = OS.gdk_atom_intern(buffer, false); GTKPRIMARYCLIPBOARD = OS.gtk_clipboard_get(primary); buffer = Converter.wcsToMbcs(null, "TARGETS", true); TARGET = OS.gdk_atom_intern(buffer, false); @@ -287,7 +287,7 @@ public Object getContents(Transfer transfer) { public Object getContents(Transfer transfer, int clipboards) { checkWidget(); if (transfer == null) DND.error(SWT.ERROR_NULL_ARGUMENT); - int /*long*/ selection_data = 0; + long /*int*/ selection_data = 0; int[] typeIds = transfer.getTypeIds(); for (int i = 0; i < typeIds.length; i++) { if ((clipboards & DND.CLIPBOARD) != 0) { @@ -563,7 +563,7 @@ public String[] getAvailableTypeNames() { String[] result = new String[types1.length + types2.length]; int count = 0; for (int i = 0; i < types1.length; i++) { - int /*long*/ pName = OS.gdk_atom_name(types1[i]); + long /*int*/ pName = OS.gdk_atom_name(types1[i]); if (pName == 0) { continue; } @@ -573,7 +573,7 @@ public String[] getAvailableTypeNames() { result[count++] = "GTKCLIPBOARD "+new String (Converter.mbcsToWcs (null, buffer)); } for (int i = 0; i < types2.length; i++) { - int /*long*/ pName = OS.gdk_atom_name(types2[i]); + long /*int*/ pName = OS.gdk_atom_name(types2[i]); if (pName == 0) { continue; } @@ -592,7 +592,7 @@ public String[] getAvailableTypeNames() { private int[] getAvailablePrimaryTypes() { int[] types = new int[0]; - int /*long*/ selection_data = gtk_clipboard_wait_for_contents(GTKPRIMARYCLIPBOARD, TARGET); + long /*int*/ selection_data = gtk_clipboard_wait_for_contents(GTKPRIMARYCLIPBOARD, TARGET); /* * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native @@ -616,7 +616,7 @@ private int[] getAvailablePrimaryTypes() { } private int[] getAvailableClipboardTypes () { int[] types = new int[0]; - int /*long*/ selection_data = gtk_clipboard_wait_for_contents(GTKCLIPBOARD, TARGET); + long /*int*/ selection_data = gtk_clipboard_wait_for_contents(GTKCLIPBOARD, TARGET); /* * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native @@ -639,11 +639,11 @@ private int[] getAvailableClipboardTypes () { return types; } -int /*long*/ gtk_clipboard_wait_for_contents(int /*long*/ clipboard, int /*long*/ target) { +long /*int*/ gtk_clipboard_wait_for_contents(long /*int*/ clipboard, long /*int*/ target) { String key = "org.eclipse.swt.internal.gtk.dispatchEvent"; Display display = this.display; display.setData(key, new int[]{OS.GDK_PROPERTY_NOTIFY, OS.GDK_SELECTION_CLEAR, OS.GDK_SELECTION_REQUEST, OS.GDK_SELECTION_NOTIFY}); - int /*long*/ selection_data = OS.gtk_clipboard_wait_for_contents(clipboard, target); + long /*int*/ selection_data = OS.gtk_clipboard_wait_for_contents(clipboard, target); display.setData(key, null); return selection_data; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java index c03768faab..b68c23e1a5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java @@ -30,7 +30,7 @@ class ClipboardProxy { Object[] primaryClipboardData; Transfer[] primaryClipboardDataTypes; - int /*long*/ clipboardOwner = OS.gtk_window_new(0); + long /*int*/ clipboardOwner = OS.gtk_window_new(0); Display display; Clipboard activeClipboard = null; Clipboard activePrimaryClipboard = null; @@ -72,7 +72,7 @@ void clear (Clipboard owner, int clipboards) { } } -int /*long*/ clearFunc(int /*long*/ clipboard,int /*long*/ user_data_or_owner){ +long /*int*/ clearFunc(long /*int*/ clipboard,long /*int*/ user_data_or_owner){ if (clipboard == Clipboard.GTKCLIPBOARD) { activeClipboard = null; clipboardData = null; @@ -119,7 +119,7 @@ void dispose () { * This function provides the data to the clipboard on request. * When this clipboard is disposed, the data will no longer be available. */ -int /*long*/ getFunc(int /*long*/ clipboard, int /*long*/ selection_data, int /*long*/ info, int /*long*/ user_data_or_owner){ +long /*int*/ getFunc(long /*int*/ clipboard, long /*int*/ selection_data, long /*int*/ info, long /*int*/ user_data_or_owner){ if (selection_data == 0) return 0; GtkSelectionData selectionData = new GtkSelectionData(); OS.memmove(selectionData, selection_data, GtkSelectionData.sizeof); @@ -146,7 +146,7 @@ int /*long*/ getFunc(int /*long*/ clipboard, int /*long*/ selection_data, int /* boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipboards) { GtkTargetEntry[] entries = new GtkTargetEntry [0]; - int /*long*/ pTargetsList = 0; + long /*int*/ pTargetsList = 0; try { for (int i = 0; i < dataTypes.length; i++) { Transfer transfer = dataTypes[i]; @@ -156,7 +156,7 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo GtkTargetEntry entry = new GtkTargetEntry(); entry.info = typeIds[j]; byte[] buffer = Converter.wcsToMbcs(null, typeNames[j], true); - int /*long*/ pName = OS.g_malloc(buffer.length); + long /*int*/ pName = OS.g_malloc(buffer.length); OS.memmove(pName, buffer, buffer.length); entry.target = pName; GtkTargetEntry[] tmp = new GtkTargetEntry [entries.length + 1]; @@ -175,8 +175,8 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo if ((clipboards & DND.CLIPBOARD) != 0) { clipboardData = data; clipboardDataTypes = dataTypes; - int /*long*/ getFuncProc = getFunc.getAddress(); - int /*long*/ clearFuncProc = clearFunc.getAddress(); + long /*int*/ getFuncProc = getFunc.getAddress(); + long /*int*/ clearFuncProc = clearFunc.getAddress(); /* * Feature in GTK. When the contents are set again, clipboard_set_with_data() * invokes clearFunc and then, getFunc is not sequentially called. @@ -198,8 +198,8 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo if ((clipboards & DND.SELECTION_CLIPBOARD) != 0) { primaryClipboardData = data; primaryClipboardDataTypes = dataTypes; - int /*long*/ getFuncProc = getFunc.getAddress(); - int /*long*/ clearFuncProc = clearFunc.getAddress(); + long /*int*/ getFuncProc = getFunc.getAddress(); + long /*int*/ clearFuncProc = clearFunc.getAddress(); if (!OS.gtk_clipboard_set_with_owner (Clipboard.GTKPRIMARYCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) { return false; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java index 87113a3fcc..f2c713ec68 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java @@ -106,7 +106,7 @@ public class DragSource extends Widget { Transfer[] transferAgents = new Transfer[0]; DragSourceEffect dragEffect; - int /*long*/ targetList; + long /*int*/ targetList; //workaround - remember action performed for DragEnd boolean moveData = false; @@ -207,28 +207,28 @@ static int checkStyle (int style) { return style; } -static int /*long*/ DragDataDelete(int /*long*/ widget, int /*long*/ context){ +static long /*int*/ DragDataDelete(long /*int*/ widget, long /*int*/ context){ DragSource source = FindDragSource(widget); if (source == null) return 0; source.dragDataDelete(widget, context); return 0; } -static int /*long*/ DragEnd(int /*long*/ widget, int /*long*/ context){ +static long /*int*/ DragEnd(long /*int*/ widget, long /*int*/ context){ DragSource source = FindDragSource(widget); if (source == null) return 0; source.dragEnd(widget, context); return 0; } -static int /*long*/ DragGetData(int /*long*/ widget, int /*long*/ context, int /*long*/ selection_data, int /*long*/ info, int /*long*/ time){ +static long /*int*/ DragGetData(long /*int*/ widget, long /*int*/ context, long /*int*/ selection_data, long /*int*/ info, long /*int*/ time){ DragSource source = FindDragSource(widget); if (source == null) return 0; source.dragGetData(widget, context, selection_data, (int)/*64*/info, (int)/*64*/time); return 0; } -static DragSource FindDragSource(int /*long*/ handle) { +static DragSource FindDragSource(long /*int*/ handle) { Display display = Display.findDisplay(Thread.currentThread()); if (display == null || display.isDisposed()) return null; Widget widget = display.findWidget(handle); @@ -297,15 +297,15 @@ void drag(Event dragEvent) { int actions = opToOsOp(getStyle()); Image image = event.image; - int /*long*/ context = OS.gtk_drag_begin(control.handle, targetList, actions, 1, 0); + long /*int*/ context = OS.gtk_drag_begin(control.handle, targetList, actions, 1, 0); if (context != 0 && image != null) { - int /*long*/ pixbuf = ImageList.createPixbuf(image); + long /*int*/ pixbuf = ImageList.createPixbuf(image); OS.gtk_drag_set_icon_pixbuf(context, pixbuf, 0, 0); OS.g_object_unref(pixbuf); } } -void dragEnd(int /*long*/ widget, int /*long*/ context){ +void dragEnd(long /*int*/ widget, long /*int*/ context){ /* * Bug in GTK. If a drag is initiated using gtk_drag_begin and the * mouse is released immediately, the mouse and keyboard remain @@ -341,7 +341,7 @@ void dragEnd(int /*long*/ widget, int /*long*/ context){ moveData = false; } -void dragGetData(int /*long*/ widget, int /*long*/ context, int /*long*/ selection_data, int info, int time){ +void dragGetData(long /*int*/ widget, long /*int*/ context, long /*int*/ selection_data, int info, int time){ if (selection_data == 0) return; GtkSelectionData gtkSelectionData = new GtkSelectionData(); OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof); @@ -376,7 +376,7 @@ void dragGetData(int /*long*/ widget, int /*long*/ context, int /*long*/ selecti return; } -void dragDataDelete(int /*long*/ widget, int /*long*/ context){ +void dragDataDelete(long /*int*/ widget, long /*int*/ context){ moveData = true; } @@ -564,7 +564,7 @@ public void setTransfer(Transfer[] transferAgents){ } } - int /*long*/ pTargets = OS.g_malloc(targets.length * GtkTargetEntry.sizeof); + long /*int*/ pTargets = OS.g_malloc(targets.length * GtkTargetEntry.sizeof); for (int i = 0; i < targets.length; i++) { OS.memmove(pTargets + i*GtkTargetEntry.sizeof, targets[i], GtkTargetEntry.sizeof); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java index eeb43d3019..ba9ced6489 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java @@ -245,33 +245,33 @@ static int checkStyle (int style) { return style; } -static int /*long*/ Drag_Data_Received ( int /*long*/ widget, int /*long*/ context, int /*long*/ x, int /*long*/ y, int /*long*/ data, int /*long*/ info, int /*long*/ time){ +static long /*int*/ Drag_Data_Received ( long /*int*/ widget, long /*int*/ context, long /*int*/ x, long /*int*/ y, long /*int*/ data, long /*int*/ info, long /*int*/ time){ DropTarget target = FindDropTarget(widget); if (target == null) return 0; target.drag_data_received (widget, context, (int)/*64*/x, (int)/*64*/y, data, (int)/*64*/info, (int)/*64*/time); return 0; } -static int /*long*/ Drag_Drop(int /*long*/ widget, int /*long*/ context, int /*long*/ x, int /*long*/ y, int /*long*/ time) { +static long /*int*/ Drag_Drop(long /*int*/ widget, long /*int*/ context, long /*int*/ x, long /*int*/ y, long /*int*/ time) { DropTarget target = FindDropTarget(widget); if (target == null) return 0; return target.drag_drop (widget, context, (int)/*64*/x, (int)/*64*/y, (int)/*64*/time) ? 1 : 0; } -static int /*long*/ Drag_Leave ( int /*long*/ widget, int /*long*/ context, int /*long*/ time){ +static long /*int*/ Drag_Leave ( long /*int*/ widget, long /*int*/ context, long /*int*/ time){ DropTarget target = FindDropTarget(widget); if (target == null) return 0; target.drag_leave (widget, context, (int)/*64*/time); return 0; } -static int /*long*/ Drag_Motion ( int /*long*/ widget, int /*long*/ context, int /*long*/ x, int /*long*/ y, int /*long*/ time){ +static long /*int*/ Drag_Motion ( long /*int*/ widget, long /*int*/ context, long /*int*/ x, long /*int*/ y, long /*int*/ time){ DropTarget target = FindDropTarget(widget); if (target == null) return 0; return target.drag_motion (widget, context, (int)/*64*/x, (int)/*64*/y, (int)/*64*/time) ? 1 : 0; } -static DropTarget FindDropTarget(int /*long*/ handle) { +static DropTarget FindDropTarget(long /*int*/ handle) { Display display = Display.findDisplay(Thread.currentThread()); if (display == null || display.isDisposed()) return null; Widget widget = display.findWidget(handle); @@ -332,7 +332,7 @@ protected void checkSubclass () { } } -void drag_data_received ( int /*long*/ widget, int /*long*/ context, int x, int y, int /*long*/ data, int info, int time){ +void drag_data_received ( long /*int*/ widget, long /*int*/ context, int x, int y, long /*int*/ data, int info, int time){ DNDEvent event = new DNDEvent(); if (data == 0 || !setEventData(context, x, y, time, event)) { keyOperation = -1; @@ -380,7 +380,7 @@ void drag_data_received ( int /*long*/ widget, int /*long*/ context, int x, int return; } -boolean drag_drop(int /*long*/ widget, int /*long*/ context, int x, int y, int time) { +boolean drag_drop(long /*int*/ widget, long /*int*/ context, int x, int y, int time) { DNDEvent event = new DNDEvent(); if (!setEventData(context, x, y, time, event)) { keyOperation = -1; @@ -417,7 +417,7 @@ boolean drag_drop(int /*long*/ widget, int /*long*/ context, int x, int y, int t return true; } -void drag_leave ( int /*long*/ widget, int /*long*/ context, int time){ +void drag_leave ( long /*int*/ widget, long /*int*/ context, int time){ updateDragOverHover(0, null); if (keyOperation == -1) return; @@ -430,7 +430,7 @@ void drag_leave ( int /*long*/ widget, int /*long*/ context, int time){ notifyListeners(DND.DragLeave, event); } -boolean drag_motion ( int /*long*/ widget, int /*long*/ context, int x, int y, int time){ +boolean drag_motion ( long /*int*/ widget, long /*int*/ context, int x, int y, int time){ int oldKeyOperation = keyOperation; /* @@ -694,7 +694,7 @@ public void setTransfer(Transfer[] transferAgents){ } } - int /*long*/ pTargets = OS.g_malloc(targets.length * GtkTargetEntry.sizeof); + long /*int*/ pTargets = OS.g_malloc(targets.length * GtkTargetEntry.sizeof); for (int i = 0; i < targets.length; i++) { OS.memmove(pTargets + i*GtkTargetEntry.sizeof, targets[i], GtkTargetEntry.sizeof); } @@ -702,7 +702,7 @@ public void setTransfer(Transfer[] transferAgents){ int actions = opToOsOp(getStyle()); if (control instanceof Combo) { if ((control.getStyle() & SWT.READ_ONLY) == 0) { - int /*long*/ entryHandle = OS.gtk_bin_get_child (control.handle); + long /*int*/ entryHandle = OS.gtk_bin_get_child (control.handle); if (entryHandle != 0) { OS.gtk_drag_dest_unset(entryHandle); } @@ -728,7 +728,7 @@ public void setDropTargetEffect(DropTargetEffect effect) { dropEffect = effect; } -boolean setEventData(int /*long*/ context, int x, int y, int time, DNDEvent event) { +boolean setEventData(long /*int*/ context, int x, int y, int time, DNDEvent event) { if (context == 0) return false; GdkDragContext dragContext = new GdkDragContext(); OS.memmove(dragContext, context, GdkDragContext.sizeof); @@ -754,7 +754,7 @@ boolean setEventData(int /*long*/ context, int x, int y, int time, DNDEvent even int length = OS.g_list_length(dragContext.targets); TransferData[] dataTypes = new TransferData[0]; for (int i = 0; i < length; i++) { - int /*long*/ pData = OS.g_list_nth(dragContext.targets, i); + long /*int*/ pData = OS.g_list_nth(dragContext.targets, i); GtkTargetPair gtkTargetPair = new GtkTargetPair(); OS.memmove(gtkTargetPair, pData, GtkTargetPair.sizeof); TransferData data = new TransferData(); @@ -771,7 +771,7 @@ boolean setEventData(int /*long*/ context, int x, int y, int time, DNDEvent even } } if (dataTypes.length == 0) return false; - int /*long*/ window; + long /*int*/ window; if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){ window = OS.gtk_widget_get_window (control.handle); } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java index 57958316ea..c8d716fc35 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/FileTransfer.java @@ -85,13 +85,13 @@ public void javaToNative(Object object, TransferData transferData) { if (length == 0) continue; char[] chars = new char[length]; string.getChars(0, length, chars, 0); - int /*long*/[] error = new int /*long*/[1]; - int /*long*/ utf8Ptr = OS.g_utf16_to_utf8(chars, chars.length, null, null, error); + long /*int*/[] error = new long /*int*/[1]; + long /*int*/ utf8Ptr = OS.g_utf16_to_utf8(chars, chars.length, null, null, error); if (error[0] != 0 || utf8Ptr == 0) continue; - int /*long*/ localePtr = OS.g_filename_from_utf8(utf8Ptr, -1, null, null, error); + long /*int*/ localePtr = OS.g_filename_from_utf8(utf8Ptr, -1, null, null, error); OS.g_free(utf8Ptr); if (error[0] != 0 || localePtr == 0) continue; - int /*long*/ uriPtr = OS.g_filename_to_uri(localePtr, 0, error); + long /*int*/ uriPtr = OS.g_filename_to_uri(localePtr, 0, error); OS.g_free(localePtr); if (error[0] != 0 || uriPtr == 0) continue; length = OS.strlen(uriPtr); @@ -111,7 +111,7 @@ public void javaToNative(Object object, TransferData transferData) { buffer = newBuffer; } if (buffer.length == 0) return; - int /*long*/ ptr = OS.g_malloc(buffer.length+1); + long /*int*/ ptr = OS.g_malloc(buffer.length+1); OS.memset(ptr, '\0', buffer.length+1); OS.memmove(ptr, buffer, buffer.length); transferData.pValue = ptr; @@ -137,7 +137,7 @@ public Object nativeToJava(TransferData transferData) { OS.memmove(temp, transferData.pValue, length); boolean gnomeList = transferData.type == GNOME_LIST_ID; int sepLength = gnomeList ? 1 : 2; - int /*long*/[] files = new int /*long*/[0]; + long /*int*/[] files = new long /*int*/[0]; int offset = 0; for (int i = 0; i < temp.length - 1; i++) { boolean terminator = gnomeList ? temp[i] == '\n' : temp[i] == '\r' && temp[i+1] == '\n'; @@ -145,11 +145,11 @@ public Object nativeToJava(TransferData transferData) { if (!(gnomeList && offset == 0)) { /* The content of the first line in a gnome-list is always either 'copy' or 'cut' */ int size = i - offset; - int /*long*/ file = OS.g_malloc(size + 1); + long /*int*/ file = OS.g_malloc(size + 1); byte[] fileBuffer = new byte[size + 1]; System.arraycopy(temp, offset, fileBuffer, 0, size); OS.memmove(file, fileBuffer, size + 1); - int /*long*/[] newFiles = new int /*long*/[files.length + 1]; + long /*int*/[] newFiles = new long /*int*/[files.length + 1]; System.arraycopy(files, 0, newFiles, 0, files.length); newFiles[files.length] = file; files = newFiles; @@ -159,27 +159,27 @@ public Object nativeToJava(TransferData transferData) { } if (offset < temp.length - sepLength) { int size = temp.length - offset; - int /*long*/ file = OS.g_malloc(size + 1); + long /*int*/ file = OS.g_malloc(size + 1); byte[] fileBuffer = new byte[size + 1]; System.arraycopy(temp, offset, fileBuffer, 0, size); OS.memmove(file, fileBuffer, size + 1); - int /*long*/[] newFiles = new int /*long*/[files.length + 1]; + long /*int*/[] newFiles = new long /*int*/[files.length + 1]; System.arraycopy(files, 0, newFiles, 0, files.length); newFiles[files.length] = file; files = newFiles; } String[] fileNames = new String[0]; for (int i = 0; i < files.length; i++) { - int /*long*/[] error = new int /*long*/[1]; - int /*long*/ localePtr = OS.g_filename_from_uri(files[i], null, error); + long /*int*/[] error = new long /*int*/[1]; + long /*int*/ localePtr = OS.g_filename_from_uri(files[i], null, error); OS.g_free(files[i]); if (error[0] != 0 || localePtr == 0) continue; - int /*long*/ utf8Ptr = OS.g_filename_to_utf8(localePtr, -1, null, null, null); + long /*int*/ utf8Ptr = OS.g_filename_to_utf8(localePtr, -1, null, null, null); if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (localePtr); if (localePtr != utf8Ptr) OS.g_free (localePtr); if (utf8Ptr == 0) continue; - 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) continue; length = (int)/*64*/items_written[0]; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/HTMLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/HTMLTransfer.java index cd7465f614..0fa1abfb54 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/HTMLTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/HTMLTransfer.java @@ -64,7 +64,7 @@ public void javaToNative (Object object, TransferData transferData){ String string = (String)object; byte[] utf8 = Converter.wcsToMbcs(null, string, true); int byteCount = utf8.length; - int /*long*/ pValue = OS.g_malloc(byteCount); + long /*int*/ pValue = OS.g_malloc(byteCount); if (pValue == 0) return; OS.memmove(pValue, utf8, byteCount); transferData.length = byteCount; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java index ffc92bbe10..ffa0b07bf6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java @@ -89,7 +89,7 @@ public void javaToNative(Object object, TransferData transferData) { ImageData imgData = (ImageData)object; if (imgData == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); Image image = new Image(Display.getCurrent(), imgData); - int /*long*/ pixbuf = ImageList.createPixbuf(image); + long /*int*/ pixbuf = ImageList.createPixbuf(image); if (pixbuf != 0) { String typeStr = ""; if (transferData.type == JPEG_ID) typeStr = "jpeg"; @@ -104,8 +104,8 @@ public void javaToNative(Object object, TransferData transferData) { else if (transferData.type == XPM_ID) typeStr = "xpm"; else if (transferData.type == XV_ID) typeStr = "xv"; byte[] type = Converter.wcsToMbcs(null, typeStr , true); - int /*long*/ [] buffer = new int /*long*/ [1]; - int /*long*/ [] len = new int /*long*/ [1]; + long /*int*/ [] buffer = new long /*int*/ [1]; + long /*int*/ [] len = new long /*int*/ [1]; if (type == null) return; OS.gdk_pixbuf_save_to_bufferv(pixbuf, buffer, len, type, null, null, null); OS.g_object_unref(pixbuf); @@ -130,11 +130,11 @@ public void javaToNative(Object object, TransferData transferData) { public Object nativeToJava(TransferData transferData) { ImageData imgData = null; if (transferData.length > 0) { - int /*long*/ loader = OS.gdk_pixbuf_loader_new(); + long /*int*/ loader = OS.gdk_pixbuf_loader_new(); try { OS.gdk_pixbuf_loader_write(loader, transferData.pValue, transferData.length, null); OS.gdk_pixbuf_loader_close(loader, null); - int /*long*/ pixbuf = OS.gdk_pixbuf_loader_get_pixbuf(loader); + long /*int*/ pixbuf = OS.gdk_pixbuf_loader_get_pixbuf(loader); if (pixbuf != 0) { Image img = Image.gtk_new_from_pixbuf(Display.getCurrent(), SWT.BITMAP, pixbuf); imgData = img.getImageData(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/RTFTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/RTFTransfer.java index 74aae33125..98284e6ff9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/RTFTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/RTFTransfer.java @@ -65,7 +65,7 @@ public void javaToNative (Object object, TransferData transferData){ } String string = (String)object; byte [] buffer = Converter.wcsToMbcs (null, string, true); - int /*long*/ pValue = OS.g_malloc(buffer.length); + long /*int*/ pValue = OS.g_malloc(buffer.length); if (pValue == 0) return; OS.memmove(pValue, buffer, buffer.length); transferData.length = buffer.length - 1; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java index 0eb7b5caee..e5917f79f7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -88,27 +88,27 @@ public class TableDragSourceEffect extends DragSourceEffect { * in versions smaller than 2.2.4 if the model is NULL. The fix is * to give a valid pointer instead. */ - int /*long*/ handle = table.handle; - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ [] model = OS.GTK_VERSION < OS.VERSION (2, 2, 4) ? new int /*long*/ [1] : null; - int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model); + long /*int*/ handle = table.handle; + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ [] model = OS.GTK_VERSION < OS.VERSION (2, 2, 4) ? new long /*int*/ [1] : null; + long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model); if (list == 0) return null; int count = Math.min(10, OS.g_list_length (list)); Display display = table.getDisplay(); if (count == 1) { - int /*long*/ path = OS.g_list_nth_data (list, 0); - int /*long*/ pixmap = OS.gtk_tree_view_create_row_drag_icon(handle, path); + long /*int*/ path = OS.g_list_nth_data (list, 0); + long /*int*/ pixmap = OS.gtk_tree_view_create_row_drag_icon(handle, path); dragSourceImage = Image.gtk_new(display, SWT.ICON, pixmap, 0); OS.gtk_tree_path_free (path); } else { int width = 0, height = 0; int[] w = new int[1], h = new int[1]; int[] yy = new int[count], hh = new int[count]; - int /*long*/ [] pixmaps = new int /*long*/ [count]; + long /*int*/ [] pixmaps = new long /*int*/ [count]; GdkRectangle rect = new GdkRectangle (); for (int i=0; i<count; i++) { - int /*long*/ path = OS.g_list_nth_data (list, i); + long /*int*/ path = OS.g_list_nth_data (list, i); OS.gtk_tree_view_get_cell_area (handle, path, 0, rect); pixmaps[i] = OS.gtk_tree_view_create_row_drag_icon(handle, path); if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) { @@ -122,10 +122,10 @@ public class TableDragSourceEffect extends DragSourceEffect { hh[i] = h[0]; OS.gtk_tree_path_free (path); } - int /*long*/ source = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1); - int /*long*/ gcSource = OS.gdk_gc_new(source); - int /*long*/ mask = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, 1); - int /*long*/ gcMask = OS.gdk_gc_new(mask); + long /*int*/ source = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1); + long /*int*/ gcSource = OS.gdk_gc_new(source); + long /*int*/ mask = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, 1); + long /*int*/ gcMask = OS.gdk_gc_new(mask); GdkColor color = new GdkColor(); color.pixel = 0; OS.gdk_gc_set_foreground(gcMask, color); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java index dc8113624e..58710ce6a1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java @@ -102,7 +102,7 @@ public class TableDropTargetEffect extends DropTargetEffect { */ public void dragLeave(DropTargetEvent event) { Table table = (Table) control; - int /*long*/ handle = table.handle; + long /*int*/ handle = table.handle; OS.gtk_tree_view_set_drag_dest_row(handle, 0, OS.GTK_TREE_VIEW_DROP_BEFORE); scrollBeginTime = 0; @@ -128,15 +128,15 @@ public class TableDropTargetEffect extends DropTargetEffect { */ public void dragOver(DropTargetEvent event) { Table table = (Table) control; - int /*long*/ handle = table.handle; + long /*int*/ handle = table.handle; int effect = checkEffect(event.feedback); Point coordinates = new Point(event.x, event.y); coordinates = table.toControl(coordinates); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_tree_view_get_path_at_pos (handle, coordinates.x, coordinates.y, path, null, null, null); int index = -1; if (path[0] != 0) { - 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[] temp = new int[1]; OS.memmove (temp, indices, 4); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java index 6e2a842c06..96b77d0b0a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java @@ -72,9 +72,9 @@ public void javaToNative (Object object, TransferData transferData) { String string = (String)object; byte[] utf8 = Converter.wcsToMbcs (null, string, true); if (transferData.type == COMPOUND_TEXT_ID) { - int /*long*/[] encoding = new int /*long*/[1]; + long /*int*/[] encoding = new long /*int*/[1]; int[] format = new int[1]; - int /*long*/[] ctext = new int /*long*/[1]; + long /*int*/[] ctext = new long /*int*/[1]; int[] length = new int[1]; boolean result; if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) { @@ -90,7 +90,7 @@ public void javaToNative (Object object, TransferData transferData) { transferData.result = 1; } if (transferData.type == UTF8_STRING_ID) { - int /*long*/ pValue = OS.g_malloc(utf8.length); + long /*int*/ pValue = OS.g_malloc(utf8.length); if (pValue == 0) return; OS.memmove(pValue, utf8, utf8.length); transferData.type = UTF8_STRING_ID; @@ -100,7 +100,7 @@ public void javaToNative (Object object, TransferData transferData) { transferData.result = 1; } if (transferData.type == STRING_ID) { - int /*long*/ string_target = OS.gdk_utf8_to_string_target(utf8); + long /*int*/ string_target = OS.gdk_utf8_to_string_target(utf8); if (string_target == 0) return; transferData.type = STRING_ID; transferData.format = 8; @@ -121,10 +121,10 @@ public void javaToNative (Object object, TransferData transferData) { */ public Object nativeToJava(TransferData transferData){ if (!isSupportedType(transferData) || transferData.pValue == 0) return null; - int /*long*/[] list = new int /*long*/[1]; + long /*int*/[] list = new long /*int*/[1]; int count = OS.gdk_text_property_to_utf8_list_for_display(OS.gdk_display_get_default(), transferData.type, transferData.format, transferData.pValue, transferData.length, list); if (count == 0) return null; - int /*long*/[] ptr = new int /*long*/[1]; + long /*int*/[] ptr = new long /*int*/[1]; OS.memmove(ptr, list[0], OS.PTR_SIZEOF); int length = OS.strlen(ptr[0]); byte[] utf8 = new byte[length]; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java index dc8fcfbe03..efd2f5546a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java @@ -40,7 +40,7 @@ public class TransferData { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ type; + public long /*int*/ type; /** * Specifies the number of units in pValue. @@ -86,7 +86,7 @@ public class TransferData { * * @noreference This field is not intended to be referenced by clients. */ - public int /*long*/ pValue; + public long /*int*/ pValue; /** * The result field contains the result of converting a diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java index 5be5ddad9a..a4f51d4504 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -87,27 +87,27 @@ public class TreeDragSourceEffect extends DragSourceEffect { * in versions smaller than 2.2.4 if the model is NULL. The fix is * to give a valid pointer instead. */ - int /*long*/ handle = tree.handle; - int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); - int /*long*/ [] model = OS.GTK_VERSION < OS.VERSION (2, 2, 4) ? new int /*long*/ [1] : null; - int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model); + long /*int*/ handle = tree.handle; + long /*int*/ selection = OS.gtk_tree_view_get_selection (handle); + long /*int*/ [] model = OS.GTK_VERSION < OS.VERSION (2, 2, 4) ? new long /*int*/ [1] : null; + long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model); if (list == 0) return null; int count = Math.min(10, OS.g_list_length (list)); Display display = tree.getDisplay(); if (count == 1) { - int /*long*/ path = OS.g_list_nth_data (list, 0); - int /*long*/ pixmap = OS.gtk_tree_view_create_row_drag_icon(handle, path); + long /*int*/ path = OS.g_list_nth_data (list, 0); + long /*int*/ pixmap = OS.gtk_tree_view_create_row_drag_icon(handle, path); dragSourceImage = Image.gtk_new(display, SWT.ICON, pixmap, 0); OS.gtk_tree_path_free (path); } else { int width = 0, height = 0; int[] w = new int[1], h = new int[1]; int[] yy = new int[count], hh = new int[count]; - int /*long*/ [] pixmaps = new int /*long*/ [count]; + long /*int*/ [] pixmaps = new long /*int*/ [count]; GdkRectangle rect = new GdkRectangle (); for (int i=0; i<count; i++) { - int /*long*/ path = OS.g_list_nth_data (list, i); + long /*int*/ path = OS.g_list_nth_data (list, i); OS.gtk_tree_view_get_cell_area (handle, path, 0, rect); pixmaps[i] = OS.gtk_tree_view_create_row_drag_icon(handle, path); if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) { @@ -121,10 +121,10 @@ public class TreeDragSourceEffect extends DragSourceEffect { hh[i] = h[0]; OS.gtk_tree_path_free (path); } - int /*long*/ source = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1); - int /*long*/ gcSource = OS.gdk_gc_new(source); - int /*long*/ mask = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, 1); - int /*long*/ gcMask = OS.gdk_gc_new(mask); + long /*int*/ source = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1); + long /*int*/ gcSource = OS.gdk_gc_new(source); + long /*int*/ mask = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, 1); + long /*int*/ gcMask = OS.gdk_gc_new(mask); GdkColor color = new GdkColor(); color.pixel = 0; OS.gdk_gc_set_foreground(gcMask, color); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDropTargetEffect.java index c7c5fd0ef9..b48787fc84 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDropTargetEffect.java @@ -111,7 +111,7 @@ public class TreeDropTargetEffect extends DropTargetEffect { */ public void dragLeave(DropTargetEvent event) { Tree tree = (Tree) control; - int /*long*/ handle = tree.handle; + long /*int*/ handle = tree.handle; OS.gtk_tree_view_set_drag_dest_row(handle, 0, OS.GTK_TREE_VIEW_DROP_BEFORE); scrollBeginTime = 0; @@ -142,14 +142,14 @@ public class TreeDropTargetEffect extends DropTargetEffect { Tree tree = (Tree) control; int effect = checkEffect(event.feedback); - int /*long*/ handle = tree.handle; + long /*int*/ handle = tree.handle; Point coordinates = new Point(event.x, event.y); coordinates = tree.toControl(coordinates); - int /*long*/ [] path = new int /*long*/ [1]; + long /*int*/ [] path = new long /*int*/ [1]; OS.gtk_tree_view_get_path_at_pos (handle, coordinates.x, coordinates.y, path, null, null, null); int index = -1; if (path[0] != 0) { - 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 depth = OS.gtk_tree_path_get_depth(path[0]); int[] temp = new int[depth]; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/URLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/URLTransfer.java index 63226b1416..7e872fbeb0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/URLTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/URLTransfer.java @@ -66,7 +66,7 @@ public void javaToNative (Object object, TransferData transferData){ char [] chars = new char[charCount +1]; string.getChars(0, charCount , chars, 0); int byteCount = chars.length*2; - int /*long*/ pValue = OS.g_malloc(byteCount); + long /*int*/ pValue = OS.g_malloc(byteCount); if (pValue == 0) return; OS.memmove(pValue, chars, byteCount); transferData.length = byteCount; |