diff options
author | Christophe Cornu <ccornu> | 2004-02-20 16:27:04 +0000 |
---|---|---|
committer | Christophe Cornu <ccornu> | 2004-02-20 16:27:04 +0000 |
commit | fcc0c13a871cf20a18999921224b7590b83d7802 (patch) | |
tree | b12a3659f1d7b55beb80e017b8713fcb64156c5b /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt | |
parent | 62fa8901ad710270f48c7ee890623da17bf1bfd8 (diff) | |
download | eclipse.platform.swt-fcc0c13a871cf20a18999921224b7590b83d7802.tar.gz eclipse.platform.swt-fcc0c13a871cf20a18999921224b7590b83d7802.tar.xz eclipse.platform.swt-fcc0c13a871cf20a18999921224b7590b83d7802.zip |
37775 - 64 bit /*long*/ markup
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt')
14 files changed, 166 insertions, 166 deletions
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 1b9fed7b22..61aa7d2625 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 @@ -36,7 +36,7 @@ public class FileDialog extends Dialog { String fileName = ""; String[] fileNames = new String [0]; String fullPath = ""; - int handle; + int /*long*/ handle; static final char SEPARATOR = System.getProperty ("file.separator").charAt (0); /** @@ -168,10 +168,10 @@ public String open () { preset (); int response = OS.gtk_dialog_run (handle); if (response == OS.GTK_RESPONSE_OK) { - int fileNamePtr = OS.gtk_file_selection_get_filename (handle); - int utf8Ptr = OS.g_filename_to_utf8 (fileNamePtr, -1, null, null, null); + int /*long*/ fileNamePtr = OS.gtk_file_selection_get_filename (handle); + int /*long*/ utf8Ptr = OS.g_filename_to_utf8 (fileNamePtr, -1, null, null, null); int [] items_written = new int [1]; - int utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); + int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); int length = items_written [0]; char [] buffer = new char [length]; OS.memmove (buffer, utf16Ptr, length * 2); @@ -251,8 +251,8 @@ void preset() { int length = fullPath.length (); char [] buffer = new char [length + 1]; fullPath.getChars (0, length, buffer, 0); - int utf8Ptr = OS.g_utf16_to_utf8 (buffer, -1, null, null, null); - int fileNamePtr = OS.g_filename_from_utf8 (utf8Ptr, -1, null, null, null); + int /*long*/ utf8Ptr = OS.g_utf16_to_utf8 (buffer, -1, null, null, null); + int /*long*/ fileNamePtr = OS.g_filename_from_utf8 (utf8Ptr, -1, null, null, null); OS.gtk_file_selection_set_filename (handle, fileNamePtr); OS.g_free (utf8Ptr); OS.g_free (fileNamePtr); @@ -279,8 +279,8 @@ String interpretOsAnswer(String osAnswer) { if ((style & SWT.MULTI) == 0) { fileNames = new String[] {fileName}; } else { - int namesPtr = OS.gtk_file_selection_get_selections (handle); - int namesPtr1 = namesPtr; + int /*long*/ namesPtr = OS.gtk_file_selection_get_selections (handle); + int /*long*/ namesPtr1 = namesPtr; int [] namePtr = new int [1]; OS.memmove (namePtr, namesPtr1, 4); int length = 0; @@ -293,9 +293,9 @@ String interpretOsAnswer(String osAnswer) { namePtr = new int [length]; OS.memmove (namePtr, namesPtr, length * 4); for (int i = 0; i < length; i++) { - int utf8Ptr = OS.g_filename_to_utf8 (namePtr [i], -1, null, null, null); + int /*long*/ utf8Ptr = OS.g_filename_to_utf8 (namePtr [i], -1, null, null, null); int [] items_written = new int [1]; - int utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); + int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null); char[] buffer = new char [items_written [0]]; OS.memmove (buffer, utf16Ptr, items_written [0] * 2); String name = new String (buffer); 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 815faa9518..724d2091f2 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 @@ -138,7 +138,7 @@ public RGB getRGB () { * </ul> */ public FontData open () { - int handle; + int /*long*/ handle; byte [] titleBytes; titleBytes = Converter.wcsToMbcs (null, title, true); handle = OS.gtk_font_selection_dialog_new (titleBytes); @@ -159,11 +159,11 @@ public FontData open () { int response = OS.gtk_dialog_run(handle); boolean success = response == OS.GTK_RESPONSE_OK; if (success) { - int fontName = OS.gtk_font_selection_dialog_get_font_name (handle); + int /*long*/ 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); - int fontDesc = OS.pango_font_description_from_string (buffer); + int /*long*/ fontDesc = OS.pango_font_description_from_string (buffer); Display display = parent != null ? parent.display : Display.getCurrent (); Font font = Font.gtk_new (display, fontDesc); fontData = font.getFontData () [0]; 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 b9560c9f6b..503023a73e 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 @@ -37,7 +37,7 @@ import org.eclipse.swt.graphics.*; * </p> */ public class Group extends Composite { - int clientHandle, labelHandle; + int /*long*/ clientHandle, labelHandle; String text = ""; /** @@ -88,7 +88,7 @@ static int checkStyle (int style) { return style & ~(SWT.H_SCROLL | SWT.V_SCROLL); } -int clientHandle () { +int /*long*/ clientHandle () { return clientHandle; } @@ -145,7 +145,7 @@ void createHandle(int index) { OS.gtk_object_sink (labelHandle); clientHandle = OS.gtk_fixed_new(); if (clientHandle == 0) error (SWT.ERROR_NO_HANDLES); - int parentHandle = parent.parentingHandle (); + int /*long*/ parentHandle = parent.parentingHandle (); OS.gtk_container_add (parentHandle, fixedHandle); OS.gtk_container_add (fixedHandle, handle); OS.gtk_container_add (handle, clientHandle); @@ -177,7 +177,7 @@ void enableWidget (boolean enabled) { OS.gtk_widget_set_sensitive (labelHandle, enabled); } -int eventHandle () { +int /*long*/ eventHandle () { return fixedHandle; } @@ -242,7 +242,7 @@ boolean mnemonicMatch (char key) { return mnemonicMatch (labelHandle, key); } -int parentingHandle() { +int /*long*/ parentingHandle() { return clientHandle; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ImageList.java index ca36e6696f..b51f58de13 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ImageList.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ImageList.java @@ -16,12 +16,12 @@ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; class ImageList { - int [] pixbufs; + int /*long*/ [] pixbufs; Image [] images; public ImageList() { images = new Image [4]; - pixbufs = new int [4]; + pixbufs = new int /*long*/ [4]; } public int add (Image image) { @@ -41,18 +41,18 @@ public int add (Image image) { OS.gdk_drawable_get_size (image.pixmap, w, h); int width = w [0], height = h [0]; boolean hasMask = image.mask != 0; - int pixbuf = OS.gdk_pixbuf_new (OS.GDK_COLORSPACE_RGB, hasMask, 8, width, height); + int /*long*/ pixbuf = OS.gdk_pixbuf_new (OS.GDK_COLORSPACE_RGB, hasMask, 8, width, height); if (pixbuf == 0) SWT.error (SWT.ERROR_NO_HANDLES); - int colormap = OS.gdk_colormap_get_system (); + int /*long*/ colormap = OS.gdk_colormap_get_system (); OS.gdk_pixbuf_get_from_drawable (pixbuf, image.pixmap, colormap, 0, 0, 0, 0, width, height); if (hasMask) { - int gdkMaskImagePtr = OS.gdk_drawable_get_image (image.mask, 0, 0, width, height); + int /*long*/ gdkMaskImagePtr = OS.gdk_drawable_get_image (image.mask, 0, 0, width, height); if (gdkMaskImagePtr == 0) SWT.error (SWT.ERROR_NO_HANDLES); int stride = OS.gdk_pixbuf_get_rowstride (pixbuf); - int pixels = OS.gdk_pixbuf_get_pixels (pixbuf); + int /*long*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); byte [] line = new byte [stride]; for (int y=0; y<height; y++) { - int offset = pixels + (y * stride); + int /*long*/ offset = pixels + (y * stride); OS.memmove (line, offset, stride); for (int x=0; x<width; x++) { if (OS.gdk_image_get_pixel (gdkMaskImagePtr, x, y) == 0) { @@ -67,7 +67,7 @@ public int add (Image image) { Image [] newImages = new Image [images.length + 4]; System.arraycopy (images, 0, newImages, 0, images.length); images = newImages; - int [] newPixbufs = new int [pixbufs.length + 4]; + int /*long*/ [] newPixbufs = new int /*long*/ [pixbufs.length + 4]; System.arraycopy (pixbufs, 0, newPixbufs, 0, pixbufs.length); pixbufs = newPixbufs; } @@ -89,7 +89,7 @@ public Image get (int index) { return images [index]; } -int getPixbuf (int index) { +int /*long*/ getPixbuf (int index) { return pixbufs [index]; } 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 037a69fec9..fe1057ebf4 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 @@ -39,7 +39,7 @@ import org.eclipse.swt.graphics.*; * </p> */ public class Label extends Control { - int frameHandle, labelHandle, imageHandle; + int /*long*/ frameHandle, labelHandle, imageHandle; Image image; String text; @@ -167,7 +167,7 @@ void createHandle (int index) { } else { OS.gtk_container_add (fixedHandle, handle); } - int parentHandle = parent.parentingHandle (); + int /*long*/ parentHandle = parent.parentingHandle (); OS.gtk_container_add (parentHandle, fixedHandle); OS.gtk_widget_show (fixedHandle); if ((style & SWT.SEPARATOR) != 0) return; @@ -204,7 +204,7 @@ void deregister () { if (imageHandle != 0) display.removeWidget (imageHandle); } -int eventHandle () { +int /*long*/ eventHandle () { return fixedHandle; } @@ -323,7 +323,7 @@ void releaseWidget () { void resizeHandle (int width, int height) { OS.gtk_widget_set_size_request (fixedHandle, width, height); - int widgetHandle = frameHandle != 0 ? frameHandle : handle; + int /*long*/ widgetHandle = frameHandle != 0 ? frameHandle : handle; OS.gtk_widget_set_size_request (widgetHandle, width, height); /* @@ -422,7 +422,7 @@ boolean setBounds (int x, int y, int width, int height, boolean move, boolean re int labelWidth = OS.GTK_WIDGET_WIDTH (handle); int labelHeight = OS.GTK_WIDGET_HEIGHT (handle); OS.gtk_widget_set_size_request (labelHandle, labelWidth, labelHeight); - int widgetHandle = frameHandle != 0 ? frameHandle : handle; + int /*long*/ widgetHandle = frameHandle != 0 ? frameHandle : handle; GtkRequisition requisition = new GtkRequisition (); OS.gtk_widget_size_request (widgetHandle, requisition); } 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 7f7687815d..0b1af78319 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 @@ -35,7 +35,7 @@ import org.eclipse.swt.events.*; * </p> */ public class List extends Scrollable { - int modelHandle; + int /*long*/ modelHandle; static final int TEXT_COLUMN = 0; @@ -94,7 +94,7 @@ public void add (String string) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); byte [] buffer = Converter.wcsToMbcs (null, string, true); - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ 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); @@ -135,7 +135,7 @@ public void add (String string, int index) { error (SWT.ERROR_INVALID_RANGE); } byte [] buffer = Converter.wcsToMbcs (null, string, true); - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); if (iter == 0) error (SWT.ERROR_ITEM_NOT_ADDED); if (index == count) { OS.gtk_list_store_append (modelHandle, iter); @@ -193,19 +193,19 @@ void createHandle (int index) { * Columns: * 0 - text */ - int [] types = new int [] {OS.G_TYPE_STRING ()}; + int /*long*/ [] types = new int /*long*/ [] {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 textRenderer = OS.gtk_cell_renderer_text_new (); + int /*long*/ textRenderer = OS.gtk_cell_renderer_text_new (); if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES); - int columnHandle = OS.gtk_tree_view_column_new (); + int /*long*/ 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, "text", TEXT_COLUMN); OS.gtk_tree_view_insert_column (handle, columnHandle, index); - int parentHandle = parent.parentingHandle (); + int /*long*/ parentHandle = parent.parentingHandle (); OS.gtk_container_add (parentHandle, fixedHandle); OS.gtk_container_add (fixedHandle, scrolledHandle); OS.gtk_container_add (scrolledHandle, handle); @@ -254,7 +254,7 @@ void deregister() { public void deselect (int index) { checkWidget(); if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) return; - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); 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); @@ -285,7 +285,7 @@ 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 iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); 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++) { @@ -316,7 +316,7 @@ public void deselect (int start, int end) { public void deselect (int [] indices) { checkWidget(); if (indices == null) error (SWT.ERROR_NULL_ARGUMENT); - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); int count = OS.gtk_tree_model_iter_n_children (modelHandle, 0); 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); @@ -363,10 +363,10 @@ GdkColor getBackgroundColor () { */ public int getFocusIndex () { checkWidget(); - int [] path = new int [1]; + int /*long*/ [] path = new int /*long*/ [1]; OS.gtk_tree_view_get_cursor (handle, path, null); if (path [0] == 0) return -1; - int indices = OS.gtk_tree_path_get_indices (path [0]); + int /*long*/ 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]); @@ -401,7 +401,7 @@ public String getItem (int index) { error (SWT.ERROR_INVALID_RANGE); } int [] ptr = new int [1]; - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ 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); @@ -447,9 +447,9 @@ public int getItemCount () { */ public int getItemHeight () { checkWidget(); - int column = OS.gtk_tree_view_get_column (handle, 0); - int list = OS.gtk_tree_view_column_get_cell_renderers (column); - int renderer = OS.g_list_nth_data (list, 0); + int /*long*/ column = OS.gtk_tree_view_get_column (handle, 0); + int /*long*/ list = OS.gtk_tree_view_column_get_cell_renderers (column); + int /*long*/ renderer = OS.g_list_nth_data (list, 0); OS.g_list_free (list); int [] h = new int [1]; OS.gtk_cell_renderer_get_size (renderer, handle, null, null, null, null, h); @@ -483,7 +483,7 @@ public String [] getItems () { int count = OS.gtk_tree_model_iter_n_children (modelHandle, 0); int [] ptr = new int [1]; String [] result = new String [count]; - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ 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); @@ -621,24 +621,24 @@ public int [] getSelectionIndices () { */ public int getTopIndex () { checkWidget(); - int [] path = new int [1]; + int /*long*/ [] path = new int /*long*/ [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 indices = OS.gtk_tree_path_get_indices (path[0]); + int /*long*/ 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 gtk_changed (int widget) { +int /*long*/ gtk_changed (int /*long*/ widget) { postEvent (SWT.Selection); return 0; } -int gtk_button_press_event (int widget, int event) { - int result = super.gtk_button_press_event (widget, event); +int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { + int /*long*/ 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 @@ -652,7 +652,7 @@ int gtk_button_press_event (int widget, int event) { OS.memmove (gdkEvent, event, GdkEventButton.sizeof); int button = gdkEvent.button; if (button == 3 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { - int [] path = new int [1]; + int /*long*/ [] path = new int /*long*/ [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 selection = OS.gtk_tree_view_get_selection (handle); @@ -670,7 +670,7 @@ int gtk_button_press_event (int widget, int event) { * widget from automatically selecting the first item. */ if ((style & SWT.SINGLE) != 0 && getSelectionCount () == 0) { - int [] path = new int [1]; + int /*long*/ [] path = new int /*long*/ [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 selection = OS.gtk_tree_view_get_selection (handle); @@ -684,8 +684,8 @@ int gtk_button_press_event (int widget, int event) { return result; } -int gtk_key_press_event (int widget, int event) { - int result = super.gtk_key_press_event (widget, event); +int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) { + int /*long*/ result = super.gtk_key_press_event (widget, event); if (result != 0) return result; /* @@ -707,7 +707,7 @@ int gtk_key_press_event (int widget, int event) { return result; } -int gtk_row_activated (int tree, int path, int column) { +int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long*/ column) { postEvent (SWT.DefaultSelection); return 0; } @@ -792,13 +792,13 @@ public boolean isSelected (int index) { checkWidget(); int selection = OS.gtk_tree_view_get_selection (handle); byte [] buffer = Converter.wcsToMbcs (null, Integer.toString (index), true); - int path = OS.gtk_tree_path_new_from_string (buffer); + int /*long*/ 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 paintWindow () { +int /*long*/ paintWindow () { OS.gtk_widget_realize (handle); return OS.gtk_tree_view_get_bin_window (handle); } @@ -836,7 +836,7 @@ public void remove (int index) { if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) { error (SWT.ERROR_INVALID_RANGE); } - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); 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); @@ -871,7 +871,7 @@ public void remove (int start, int end) { if (!(0 <= start && start <= end && end < count)) { error (SWT.ERROR_INVALID_RANGE); } - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); 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--) { @@ -938,7 +938,7 @@ public void remove (int [] indices) { if (!(0 <= start && start <= end && end < count)) { error (SWT.ERROR_INVALID_RANGE); } - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); 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; @@ -1010,13 +1010,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 iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); 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 path = OS.gtk_tree_model_get_path (modelHandle, iter); + int /*long*/ 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); } @@ -1046,14 +1046,14 @@ public void select (int start, int end) { if (count <= start || count == 0) return; start = Math.min (count - 1, Math.max (0, start)); end = Math.min (count - 1, Math.max (0, end)); - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); 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 path = OS.gtk_tree_model_get_path (modelHandle, iter); + int /*long*/ 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); } @@ -1082,7 +1082,7 @@ public void select (int start, int end) { public void select (int [] indices) { checkWidget(); if (indices == null) error (SWT.ERROR_NULL_ARGUMENT); - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); int count = OS.gtk_tree_model_iter_n_children (modelHandle, 0); 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); @@ -1092,7 +1092,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 path = OS.gtk_tree_model_get_path (modelHandle, iter); + int /*long*/ 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); break; @@ -1127,9 +1127,9 @@ void selectFocusIndex (int index) { */ int count = OS.gtk_tree_model_iter_n_children (modelHandle, 0); if (!(0 <= index && index < count)) return; - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); - int path = OS.gtk_tree_model_get_path (modelHandle, iter); + int /*long*/ 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); OS.g_free (iter); @@ -1187,7 +1187,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 iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ 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); @@ -1217,7 +1217,7 @@ public void setItems (String [] items) { 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 iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ 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]; @@ -1395,9 +1395,9 @@ public void setTopIndex (int index) { checkWidget(); if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) return; // FIXME - For some reason, sometimes the tree scrolls to the wrong place - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); - int path = OS.gtk_tree_model_get_path (modelHandle, iter); + int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0, 0); OS.gtk_tree_path_free (path); OS.g_free (iter); @@ -1417,17 +1417,17 @@ public void showSelection () { checkWidget(); int index = getSelectionIndex (); if (index == -1) return; - int iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); + int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); - int path = OS.gtk_tree_model_get_path (modelHandle, iter); + int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0, 0); OS.gtk_tree_path_free (path); OS.g_free (iter); } -int treeSelectionProc (int model, int path, int iter, int[] selection, int length) { +int /*long*/ treeSelectionProc (int /*long*/ model, int /*long*/ path, int /*long*/ iter, int[] selection, int length) { if (selection != null) { - int indices = OS.gtk_tree_path_get_indices (path); + int /*long*/ indices = OS.gtk_tree_path_get_indices (path); if (indices != 0) { int [] index = new int [1]; OS.memmove (index, indices, 4); 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 56a1c5a5f5..6789ac8726 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 @@ -39,7 +39,7 @@ public class Menu extends Widget { boolean hasLocation; MenuItem cascade, selectedItem; Decorations parent; - int imItem, imSeparator, imHandle; + int /*long*/ imItem, imSeparator, imHandle; /** * Constructs a new instance of this class given its parent, @@ -173,7 +173,7 @@ public void _setVisible (boolean visible) { if (visible) { sendEvent (SWT.Show); if (getItemCount () != 0) { - int address = 0; + int /*long*/ address = 0; if (hasLocation) address = display.menuPositionProc; OS.gtk_menu_popup (handle, 0, 0, address, 0, 0, display.popupTime); } else { @@ -184,7 +184,7 @@ public void _setVisible (boolean visible) { } } -void addAccelerators (int accelGroup) { +void addAccelerators (int /*long*/ accelGroup) { MenuItem [] items = getItems (); for (int i = 0; i < items.length; i++) { MenuItem item = items[i]; @@ -250,7 +250,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 parentHandle = parent.fixedHandle; + int /*long*/ parentHandle = parent.fixedHandle; OS.gtk_container_add (parentHandle, handle); } else { handle = OS.gtk_menu_new (); @@ -258,7 +258,7 @@ void createHandle (int index) { } } -void createIMMenu (int imHandle) { +void createIMMenu (int /*long*/ imHandle) { if (this.imHandle == imHandle) return; this.imHandle = imHandle; if (imHandle == 0) { @@ -283,7 +283,7 @@ void createIMMenu (int imHandle) { OS.gtk_widget_show (imItem); OS.gtk_menu_shell_insert (handle, imItem, -1); } - int imSubmenu = OS.gtk_menu_new (); + int /*long*/ imSubmenu = OS.gtk_menu_new (); OS.gtk_im_multicontext_append_menuitems (imHandle, imSubmenu); OS.gtk_menu_item_set_submenu (imItem, imSubmenu); } @@ -364,7 +364,7 @@ public MenuItem getItem (int index) { if (imSeparator != 0) count--; if (imItem != 0) count--; if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE); - int data = OS.g_list_nth_data (list, index); + int /*long*/ 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); @@ -416,7 +416,7 @@ public MenuItem [] getItems () { if (imItem != 0) count--; MenuItem [] items = new MenuItem [count]; for (int i=0; i<count; i++) { - int data = OS.g_list_nth_data (list, i); + int /*long*/ data = OS.g_list_nth_data (list, i); items [i] = (MenuItem) display.getWidget (data); } OS.g_list_free (list); @@ -543,7 +543,7 @@ public boolean getVisible () { return OS.GTK_WIDGET_MAPPED (handle); } -int gtk_hide (int widget) { +int /*long*/ gtk_hide (int /*long*/ widget) { if ((style & SWT.POP_UP) != 0) { Shell shell = getShell (); shell.hasFocus = true; @@ -552,7 +552,7 @@ int gtk_hide (int widget) { return 0; } -int gtk_show (int widget) { +int /*long*/ gtk_show (int /*long*/ widget) { if ((style & SWT.POP_UP) != 0) { Shell shell = getShell (); shell.hasFocus = true; @@ -563,7 +563,7 @@ int gtk_show (int widget) { } -int gtk_show_help (int widget, int helpType) { +int /*long*/ gtk_show_help (int /*long*/ widget, int /*long*/ helpType) { if (sendHelpEvent (helpType)) { OS.gtk_menu_shell_deactivate (handle); return 1; @@ -573,8 +573,8 @@ int gtk_show_help (int widget, int helpType) { void hookEvents () { super.hookEvents (); - int windowProc2 = display.windowProc2; - int windowProc3 = display.windowProc3; + int /*long*/ windowProc2 = display.windowProc2; + int /*long*/ windowProc3 = display.windowProc3; OS.g_signal_connect (handle, OS.show, windowProc2, SHOW); OS.g_signal_connect (handle, OS.hide, windowProc2, HIDE); OS.g_signal_connect (handle, OS.show_help, windowProc3, SHOW_HELP); @@ -648,7 +648,7 @@ public boolean isVisible () { return getVisible (); } -int menuPositionProc (int menu, int x, int y, int push_in, int user_data) { +int /*long*/ menuPositionProc (int /*long*/ menu, int /*long*/ x, int /*long*/ y, int /*long*/ push_in, int /*long*/ user_data) { if (x != 0) OS.memmove (x, new int [] {this.x}, 4); if (y != 0) OS.memmove (y, new int [] {this.y}, 4); if (push_in != 0) OS.memmove (push_in, new int [] {1}, 4); @@ -705,7 +705,7 @@ public void removeMenuListener (MenuListener listener) { eventTable.unhook (SWT.Show, listener); } -void removeAccelerators (int accelGroup) { +void removeAccelerators (int /*long*/ accelGroup) { MenuItem [] items = getItems (); for (int i = 0; i < items.length; i++) { MenuItem item = items[i]; @@ -737,7 +737,7 @@ public void removeHelpListener (HelpListener listener) { eventTable.unhook (SWT.Help, listener); } -boolean sendHelpEvent (int helpType) { +boolean sendHelpEvent (int /*long*/ 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 d20ced240c..0cdd748fba 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 @@ -122,11 +122,11 @@ public MenuItem (Menu parent, int style, int index) { createWidget (index); } -void addAccelerator (int accelGroup) { +void addAccelerator (int /*long*/ accelGroup) { updateAccelerator (accelGroup, true); } -void addAccelerators (int accelGroup) { +void addAccelerators (int /*long*/ accelGroup) { addAccelerator (accelGroup); if (menu != null) menu.addAccelerators (accelGroup); } @@ -247,10 +247,10 @@ void createHandle (int index) { } if (handle == 0) error (SWT.ERROR_NO_HANDLES); if ((style & SWT.SEPARATOR) == 0) { - int label = OS.gtk_bin_get_child (handle); + int /*long*/ label = OS.gtk_bin_get_child (handle); OS.gtk_accel_label_set_accel_widget (label, 0); } - int parentHandle = parent.handle; + int /*long*/ parentHandle = parent.handle; boolean enabled = OS.GTK_WIDGET_SENSITIVE (parentHandle); if (!enabled) OS.GTK_WIDGET_SET_FLAGS (parentHandle, OS.GTK_SENSITIVE); OS.gtk_menu_shell_insert (parentHandle, handle, index); @@ -280,7 +280,7 @@ public int getAccelerator () { return accelerator; } -int getAccelGroup () { +int /*long*/ getAccelGroup () { Menu menu = parent; while (menu != null && menu.cascade != null) { menu = menu.cascade.parent; @@ -363,7 +363,7 @@ public boolean getSelection () { return OS.gtk_check_menu_item_get_active(handle); } -int gtk_activate (int widget) { +int /*long*/ gtk_activate (int /*long*/ widget) { if ((style & SWT.CASCADE) != 0 && menu != null) return 0; /* * Bug in GTK. When an ancestor menu is disabled and @@ -374,7 +374,7 @@ int gtk_activate (int widget) { */ if (!isEnabled ()) return 0; Event event = new Event (); - int ptr = OS.gtk_get_current_event (); + int /*long*/ ptr = OS.gtk_get_current_event (); if (ptr != 0) { GdkEvent gdkEvent = new GdkEvent (); OS.memmove (gdkEvent, ptr, GdkEvent.sizeof); @@ -401,13 +401,13 @@ int gtk_activate (int widget) { return 0; } -int gtk_select (int item) { +int /*long*/ gtk_select (int /*long*/ item) { parent.selectedItem = this; postEvent (SWT.Arm); return 0; } -int gtk_show_help (int widget, int helpType) { +int /*long*/ gtk_show_help (int /*long*/ widget, int /*long*/ helpType) { boolean handled = hooks (SWT.Help); if (handled) { postEvent (SWT.Help); @@ -423,8 +423,8 @@ int gtk_show_help (int widget, int helpType) { void hookEvents () { super.hookEvents (); - int windowProc2 = display.windowProc2; - int windowProc3 = display.windowProc3; + int /*long*/ windowProc2 = display.windowProc2; + int /*long*/ windowProc3 = display.windowProc3; OS.g_signal_connect (handle, OS.activate, windowProc2, ACTIVATE); OS.g_signal_connect (handle, OS.select, windowProc2, SELECT); OS.g_signal_connect (handle, OS.show_help, windowProc3, SHOW_HELP); @@ -462,17 +462,17 @@ void releaseWidget () { if (menu != null) menu.releaseResources (); menu = null; super.releaseWidget (); - int accelGroup = getAccelGroup (); + int /*long*/ accelGroup = getAccelGroup (); if (accelGroup != 0) removeAccelerator (accelGroup); accelerator = 0; parent = null; } -void removeAccelerator (int accelGroup) { +void removeAccelerator (int /*long*/ accelGroup) { updateAccelerator (accelGroup, false); } -void removeAccelerators (int accelGroup) { +void removeAccelerators (int /*long*/ accelGroup) { removeAccelerator (accelGroup); if (menu != null) menu.removeAccelerators (accelGroup); } @@ -576,7 +576,7 @@ void selectRadio () { public void setAccelerator (int accelerator) { checkWidget(); if (this.accelerator == accelerator) return; - int accelGroup = getAccelGroup (); + int /*long*/ accelGroup = getAccelGroup (); if (accelGroup != 0) removeAccelerator (accelGroup); this.accelerator = accelerator; if (accelGroup != 0) addAccelerator (accelGroup); @@ -619,7 +619,7 @@ public void setImage (Image image) { super.setImage (image); if (!OS.GTK_IS_IMAGE_MENU_ITEM (handle)) return; if (image != null) { - int imageHandle = OS.gtk_image_new_from_pixmap (image.pixmap, image.mask); + int /*long*/ imageHandle = OS.gtk_image_new_from_pixmap (image.pixmap, image.mask); OS.gtk_image_menu_item_set_image (handle, imageHandle); OS.gtk_widget_show (imageHandle); } else { @@ -666,7 +666,7 @@ public void setMenu (Menu menu) { /* Assign the new menu */ Menu oldMenu = this.menu; if (oldMenu == menu) return; - int accelGroup = getAccelGroup (); + int /*long*/ accelGroup = getAccelGroup (); if (accelGroup != 0) removeAccelerators (accelGroup); if (oldMenu != null) { oldMenu.cascade = null; @@ -764,17 +764,17 @@ public void setText (String string) { } char [] chars = fixMnemonic (string); byte [] buffer = Converter.wcsToMbcs (null, chars, true); - int label = OS.gtk_bin_get_child (handle); + int /*long*/ label = OS.gtk_bin_get_child (handle); OS.gtk_label_set_text_with_mnemonic (label, buffer); buffer = Converter.wcsToMbcs (null, accelString, true); - int ptr = OS.g_malloc (buffer.length); + int /*long*/ ptr = OS.g_malloc (buffer.length); OS.memmove (ptr, buffer, buffer.length); int oldPtr = OS.GTK_ACCEL_LABEL_ACCEL_STRING (label); OS.GTK_ACCEL_LABEL_ACCEL_STRING (label, ptr); if (oldPtr != 0) OS.g_free (oldPtr); } -void updateAccelerator (int accelGroup, boolean add) { +void updateAccelerator (int /*long*/ accelGroup, boolean add) { if (accelerator == 0) return; int mask = 0; if ((accelerator & SWT.ALT) != 0) mask |= OS.GDK_MOD1_MASK; 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 b5e1032177..773d53edc4 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 @@ -139,7 +139,7 @@ public void setMessage (String string) { * </ul> */ public int open () { - int parentHandle = (parent != null)? parent.topHandle() : 0; + int /*long*/ 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; 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 d64ba5eb3d..5e897d2f1d 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 @@ -78,7 +78,7 @@ void createHandle (int index) { state |= HANDLE; handle = OS.gtk_progress_bar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); - int parentHandle = parent.parentingHandle (); + int /*long*/ parentHandle = parent.parentingHandle (); OS.gtk_container_add (parentHandle, handle); OS.gtk_widget_show (handle); int orientation = (style & SWT.VERTICAL) != 0 ? OS.GTK_PROGRESS_BOTTOM_TO_TOP : OS.GTK_PROGRESS_LEFT_TO_RIGHT; @@ -139,8 +139,8 @@ public int getSelection () { return selection; } -int gtk_realize (int widget) { - int result = super.gtk_realize (widget); +int /*long*/ gtk_realize (int /*long*/ widget) { + int /*long*/ result = super.gtk_realize (widget); if (result != 0) return result; /* * Bug in GTK. When a progress bar has been unrealized after being @@ -216,7 +216,7 @@ public void setSelection (int value) { updateBar (selection, minimum, maximum); } -int timerProc (int widget) { +int /*long*/ timerProc (int /*long*/ widget) { if (isVisible ()) OS.gtk_progress_bar_pulse (handle); return 1; } @@ -240,7 +240,7 @@ void updateBar (int selection, int minimum, int maximum) { * outstanding redraws to be delivered. */ OS.gdk_flush (); - int window = paintWindow (); + int /*long*/ window = paintWindow (); OS.gdk_window_process_updates (window, false); } } 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 4704012f3f..535c44c7c3 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 @@ -36,7 +36,7 @@ import org.eclipse.swt.events.*; public class Sash extends Control { boolean dragging; int startX, startY, lastX, lastY; - int defaultCursor; + int /*long*/ defaultCursor; private final static int INCREMENT = 1; private final static int PAGE_INCREMENT = 9; @@ -132,22 +132,22 @@ void createHandle (int index) { handle = OS.gtk_drawing_area_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_CAN_FOCUS); - int parentHandle = parent.parentingHandle (); + int /*long*/ parentHandle = parent.parentingHandle (); OS.gtk_container_add (parentHandle, handle); OS.gtk_widget_show (handle); int type = (style & SWT.VERTICAL) != 0 ? OS.GDK_SB_H_DOUBLE_ARROW : OS.GDK_SB_V_DOUBLE_ARROW; defaultCursor = OS.gdk_cursor_new (type); - int window = OS.GTK_WIDGET_WINDOW (handle); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle); if (window != 0) OS.gdk_window_set_cursor (window, defaultCursor); } void drawBand (int x, int y, int width, int height) { - int window = OS.GTK_WIDGET_WINDOW (parent.paintHandle()); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (parent.paintHandle()); if (window == 0) return; byte [] bits = {-86, 85, -86, 85, -86, 85, -86, 85}; - int stipplePixmap = OS.gdk_bitmap_create_from_data (window, bits, 8, 8); - int gc = OS.gdk_gc_new (window); - int colormap = OS.gdk_colormap_get_system(); + 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(); GdkColor color = new GdkColor (); OS.gdk_color_white (colormap, color); OS.gdk_gc_set_foreground (gc, color); @@ -160,13 +160,13 @@ void drawBand (int x, int y, int width, int height) { OS.g_object_unref (gc); } -int gtk_button_press_event (int widget, int eventPtr) { - int result = super.gtk_button_press_event (widget, eventPtr); +int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr) { + int /*long*/ result = super.gtk_button_press_event (widget, eventPtr); GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); int button = gdkEvent.button; if (button != 1) return 0; - int window = OS.GTK_WIDGET_WINDOW (widget); + int /*long*/ window = OS.GTK_WIDGET_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]); @@ -201,8 +201,8 @@ int gtk_button_press_event (int widget, int eventPtr) { return result; } -int gtk_button_release_event (int widget, int eventPtr) { - int result = super.gtk_button_release_event (widget, eventPtr); +int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ eventPtr) { + int /*long*/ result = super.gtk_button_release_event (widget, eventPtr); GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); int button = gdkEvent.button; @@ -224,8 +224,8 @@ int gtk_button_release_event (int widget, int eventPtr) { return result; } -int gtk_focus_in_event (int widget, int event) { - int result = super.gtk_focus_in_event (widget, event); +int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) { + int /*long*/ result = super.gtk_focus_in_event (widget, event); if (result != 0) return result; // widget could be disposed at this point if (handle != 0) { @@ -235,8 +235,8 @@ int gtk_focus_in_event (int widget, int event) { return 0; } -int gtk_key_press_event (int widget, int eventPtr) { - int result = super.gtk_key_press_event (widget, eventPtr); +int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) { + int /*long*/ result = super.gtk_key_press_event (widget, eventPtr); if (result != 0) return result; GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); @@ -274,9 +274,9 @@ int gtk_key_press_event (int widget, int eventPtr) { if (newX == lastX && newY == lastY) return result; /* Ensure that the pointer image does not change */ - int window = OS.GTK_WIDGET_WINDOW (handle); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle); int grabMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK; - int gdkCursor = cursor != null ? cursor.handle : defaultCursor; + int /*long*/ gdkCursor = cursor != null ? cursor.handle : defaultCursor; int ptrGrabResult = OS.gdk_pointer_grab (window, false, grabMask, window, gdkCursor, OS.GDK_CURRENT_TIME); /* The event must be sent because its doit flag is used. */ @@ -312,8 +312,8 @@ int gtk_key_press_event (int widget, int eventPtr) { return result; } -int gtk_motion_notify_event (int widget, int eventPtr) { - int result = super.gtk_motion_notify_event (widget, eventPtr); +int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr) { + int /*long*/ result = super.gtk_motion_notify_event (widget, eventPtr); int [] state = new int [1]; OS.gdk_event_get_state (eventPtr, state); if (!dragging || (state [0] & OS.GDK_BUTTON1_MASK) == 0) return 0; @@ -326,7 +326,7 @@ int gtk_motion_notify_event (int widget, int eventPtr) { int parentHeight = OS.GTK_WIDGET_HEIGHT (parent.handle); double [] root_x = new double [1], root_y = new double [1]; OS.gdk_event_get_root_coords (eventPtr, root_x, root_y); - int window = OS.GTK_WIDGET_WINDOW (widget); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (widget); int [] origin_x = new int [1], origin_y = new int [1]; OS.gdk_window_get_origin (window, origin_x, origin_y); int eventX = (int) (root_x [0] - origin_x [0]), eventY = (int) (root_y [0] - origin_y [0]); @@ -361,9 +361,9 @@ int gtk_motion_notify_event (int widget, int eventPtr) { return result; } -int gtk_realize (int widget) { - int window = OS.GTK_WIDGET_WINDOW (paintHandle()); - int gdkCursor = cursor != null && !cursor.isDisposed() ? cursor.handle : defaultCursor; +int /*long*/ gtk_realize (int /*long*/ widget) { + int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle()); + int /*long*/ gdkCursor = cursor != null && !cursor.isDisposed() ? cursor.handle : defaultCursor; OS.gdk_window_set_cursor (window, gdkCursor); return 0; } @@ -408,8 +408,8 @@ public void setCursor (Cursor cursor) { checkWidget(); if (cursor != null && cursor.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; - int gdkCursor = cursor != null ? cursor.handle : defaultCursor; - int window = OS.GTK_WIDGET_WINDOW (paintHandle ()); + int /*long*/ gdkCursor = cursor != null ? cursor.handle : defaultCursor; + int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle ()); if (window != 0) { OS.gdk_window_set_cursor (window, gdkCursor); OS.gdk_flush (); 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 45f9ff5a67..baebbc8ea4 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 @@ -118,7 +118,7 @@ void createHandle (int index) { fixedHandle = OS.gtk_fixed_new (); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_fixed_set_has_window (fixedHandle, true); - int hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); + int /*long*/ 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 = OS.gtk_hscale_new (hAdjustment); @@ -126,7 +126,7 @@ void createHandle (int index) { handle = OS.gtk_vscale_new (hAdjustment); } if (handle == 0) error (SWT.ERROR_NO_HANDLES); - int parentHandle = parent.parentingHandle (); + int /*long*/ parentHandle = parent.parentingHandle (); OS.gtk_container_add (parentHandle, fixedHandle); OS.gtk_container_add (fixedHandle, handle); OS.gtk_widget_show (fixedHandle); @@ -154,7 +154,7 @@ void hookEvents () { */ public int getIncrement () { checkWidget (); - int hAdjustment = OS.gtk_range_get_adjustment (handle); + int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.step_increment; @@ -172,7 +172,7 @@ public int getIncrement () { */ public int getMaximum () { checkWidget (); - int hAdjustment = OS.gtk_range_get_adjustment (handle); + int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.upper; @@ -190,7 +190,7 @@ public int getMaximum () { */ public int getMinimum () { checkWidget (); - int hAdjustment = OS.gtk_range_get_adjustment (handle); + int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.lower; @@ -210,7 +210,7 @@ public int getMinimum () { */ public int getPageIncrement () { checkWidget (); - int hAdjustment = OS.gtk_range_get_adjustment (handle); + int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.page_increment; @@ -228,13 +228,13 @@ public int getPageIncrement () { */ public int getSelection () { checkWidget (); - int hAdjustment = OS.gtk_range_get_adjustment (handle); + int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); return (int) adjustment.value; } -int gtk_value_changed (int adjustment) { +int /*long*/ gtk_value_changed (int /*long*/ adjustment) { postEvent (SWT.Selection); return 0; } 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 19ebc24bfb..f473b013cc 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 @@ -285,7 +285,7 @@ public int getSelection () { public Point getSize () { checkWidget (); int barHandle = 0; - int scrolledHandle = parent.scrolledHandle; + int /*long*/ scrolledHandle = parent.scrolledHandle; if ((style & SWT.HORIZONTAL) != 0) { barHandle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR (scrolledHandle); } else { @@ -336,7 +336,7 @@ public int getThumb () { */ public boolean getVisible () { checkWidget (); - int scrolledHandle = parent.scrolledHandle; + int /*long*/ 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) { @@ -346,7 +346,7 @@ public boolean getVisible () { } } -int gtk_value_changed (int adjustment) { +int /*long*/ gtk_value_changed (int /*long*/ adjustment) { postEvent (SWT.Selection); return 0; } @@ -670,7 +670,7 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i */ public void setVisible (boolean visible) { checkWidget (); - int scrolledHandle = parent.scrolledHandle; + int /*long*/ scrolledHandle = parent.scrolledHandle; int [] hsp = new int [1], vsp = new int [1]; OS.gtk_scrolled_window_get_policy (scrolledHandle, hsp, vsp); int policy = visible ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER; @@ -686,7 +686,7 @@ public void setVisible (boolean visible) { /* * Force the container to allocate the size of its children. */ - int parentHandle = parent.scrolledHandle; + int /*long*/ parentHandle = parent.scrolledHandle; OS.gtk_container_resize_children (parentHandle); parent.sendEvent (SWT.Resize); 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 c260e4120e..16acc7813f 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 @@ -30,7 +30,7 @@ import org.eclipse.swt.graphics.*; * </p> */ public abstract class Scrollable extends Control { - int scrolledHandle; + int /*long*/ scrolledHandle; ScrollBar horizontalBar, verticalBar; /** @@ -71,7 +71,7 @@ public Scrollable (Composite parent, int style) { super (parent, style); } -int clientHandle () { +int /*long*/ clientHandle () { return handle; } @@ -109,7 +109,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 style = OS.gtk_widget_get_style (scrolledHandle); + int /*long*/ 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; @@ -179,7 +179,7 @@ public int getBorderWidth () { public Rectangle getClientArea () { checkWidget (); //FIXME - List, Table, Tree, ... - int clientHandle = clientHandle (); + int /*long*/ clientHandle = clientHandle (); int width = OS.GTK_WIDGET_WIDTH (clientHandle); int height = OS.GTK_WIDGET_HEIGHT (clientHandle); if ((state & CANVAS) != 0) { @@ -283,7 +283,7 @@ void resizeHandle (int width, int height) { } } -int topHandle () { +int /*long*/ topHandle () { if (fixedHandle != 0) return fixedHandle; if (scrolledHandle != 0) return scrolledHandle; return super.topHandle (); |