diff options
21 files changed, 313 insertions, 279 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java index 3f55fe7d19..c4430e9713 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java @@ -45,7 +45,7 @@ static synchronized void loadLibrary () { public static Frame new_Frame (final Composite parent) { if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); - int handle = parent.embeddedHandle; + int /*long*/ handle = parent.embeddedHandle; /* * Some JREs have implemented the embedded frame constructor to take an integer * and other JREs take a long. To handle this binary incompatability, use @@ -57,22 +57,19 @@ public static Frame new_Frame (final Composite parent) { } catch (Throwable e) { SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e); } + Object value = null; Constructor constructor = null; try { constructor = clazz.getConstructor (new Class [] {int.class}); + value = constructor.newInstance (new Object [] {new Integer ((int)/*64*/handle)}); } catch (Throwable e1) { try { constructor = clazz.getConstructor (new Class [] {long.class}); + value = constructor.newInstance (new Object [] {new Long (handle)}); } catch (Throwable e2) { SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e2); } } - Object value = null; - try { - value = constructor.newInstance (new Object [] {new Integer (handle)}); - } catch (Throwable e) { - SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e); - } try { /* Call registerListeners() to make XEmbed focus traversal work */ Method method = clazz.getMethod("registerListeners", null); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java index 0789de11eb..6ed8fa13d4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java @@ -148,7 +148,7 @@ public class Accessible { return result; } - int getControlHandle () { + int /*long*/ getControlHandle () { return control.handle; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java index 5364eeabdf..6dd147c158 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java @@ -17,7 +17,8 @@ import org.eclipse.swt.internal.accessibility.gtk.*; import org.eclipse.swt.internal.gtk.*; class AccessibleFactory { - int handle, objectType, objectParentType; + int /*long*/ handle; + int objectType, objectParentType; Callback atkObjectFactoryCB_create_accessible; Callback gTypeInfo_base_init_factory; Hashtable accessibles = new Hashtable (9); @@ -63,11 +64,11 @@ class AccessibleFactory { static final Callback InitSelectionIfaceCB; static final Callback InitTextIfaceCB; // interface definitions - static int ObjectIfaceDefinition; - static final int ActionIfaceDefinition; - static final int ComponentIfaceDefinition; - static final int SelectionIfaceDefinition; - static final int TextIfaceDefinition; + static int /*long*/ ObjectIfaceDefinition; + static final int /*long*/ ActionIfaceDefinition; + static final int /*long*/ ComponentIfaceDefinition; + static final int /*long*/ SelectionIfaceDefinition; + static final int /*long*/ TextIfaceDefinition; static { AtkActionCB_get_keybinding = new Callback (AccessibleObject.class, "atkAction_get_keybinding", 2); AtkActionCB_get_name = new Callback (AccessibleObject.class, "atkAction_get_name", 2); @@ -126,7 +127,7 @@ class AccessibleFactory { super (); /* If DefaultParentType is 0 then OS accessibility is not active */ if (DefaultParentType == 0) return; - int widgetTypeName = ATK.g_type_name (widgetType); + int /*long*/ widgetTypeName = ATK.g_type_name (widgetType); int widgetTypeNameLength = OS.strlen (widgetTypeName) + 1; byte[] buffer = new byte [widgetTypeNameLength]; OS.memmove (buffer, widgetTypeName, widgetTypeNameLength); @@ -135,8 +136,8 @@ class AccessibleFactory { System.arraycopy (buffer, 0, factoryName, FACTORY_TYPENAME.length, widgetTypeNameLength); if (ATK.g_type_from_name (factoryName) == 0) { // register the factory - int registry = ATK.atk_get_default_registry (); - int previousFactory = ATK.atk_registry_get_factory (registry, widgetType); + int /*long*/ registry = ATK.atk_get_default_registry (); + int /*long*/ previousFactory = ATK.atk_registry_get_factory (registry, widgetType); objectParentType = ATK.atk_object_factory_get_accessible_type (previousFactory); if (objectParentType == 0) objectParentType = DefaultParentType; int factoryParentType = ATK.g_type_from_name (FACTORY_PARENTTYPENAME); @@ -157,16 +158,17 @@ class AccessibleFactory { } void addAccessible (Accessible accessible) { - int controlHandle = accessible.getControlHandle (); - accessibles.put (new Integer (controlHandle), accessible); + int /*long*/ controlHandle = accessible.getControlHandle (); + accessibles.put (new LONG (controlHandle), accessible); } - int atkObjectFactory_create_accessible (int widget) { - Accessible accessible = (Accessible) accessibles.get (new Integer (widget)); + int /*long*/ atkObjectFactory_create_accessible (int widget) { + Accessible accessible = (Accessible) accessibles.get (new LONG (widget)); + if (accessible == null) { // we don't care about this control, so create it with the parent's // type so that its accessibility callbacks will not pass though here - int result = ATK.g_object_new (objectParentType, 0); + int /*long*/ result = ATK.g_object_new (objectParentType, 0); ATK.atk_object_initialize (result, widget); return result; } @@ -176,7 +178,7 @@ class AccessibleFactory { } static int defineType (byte[] typeName, int parentType) { - int queryPtr = OS.g_malloc (GTypeQuery.sizeof); + int /*long*/ queryPtr = OS.g_malloc (GTypeQuery.sizeof); ATK.g_type_query (parentType, queryPtr); GTypeQuery query = new GTypeQuery (); ATK.memmove (query, queryPtr, GTypeQuery.sizeof); @@ -207,7 +209,7 @@ class AccessibleFactory { } int gTypeInfo_base_init_factory (int klass) { - int atkObjectFactoryClass = ATK.ATK_OBJECT_FACTORY_CLASS (klass); + int /*long*/ atkObjectFactoryClass = ATK.ATK_OBJECT_FACTORY_CLASS (klass); AtkObjectFactoryClass objectFactoryClassStruct = new AtkObjectFactoryClass (); ATK.memmove (objectFactoryClassStruct, atkObjectFactoryClass); atkObjectFactoryCB_create_accessible = new Callback (this, "atkObjectFactory_create_accessible", 1); @@ -227,7 +229,7 @@ class AccessibleFactory { objectClass.ref_state_set = AtkObjectCB_ref_state_set.getAddress (); objectClass.get_index_in_parent = AtkObjectCB_get_index_in_parent.getAddress (); objectClass.ref_child = AtkObjectCB_ref_child.getAddress (); - int gObjectClass = ATK.G_OBJECT_CLASS (klass); + int /*long*/ gObjectClass = ATK.G_OBJECT_CLASS (klass); GObjectClass objectClassStruct = new GObjectClass (); ATK.memmove (objectClassStruct, gObjectClass); objectClassStruct.finalize = GObjectClass_finalize.getAddress (); @@ -282,7 +284,7 @@ class AccessibleFactory { } static void registerAccessible (Accessible accessible) { - int controlHandle = accessible.getControlHandle (); + int /*long*/ controlHandle = accessible.getControlHandle (); int widgetType = ATK.G_TYPE_FROM_INSTANCE (controlHandle); AccessibleFactory factory = (AccessibleFactory) Factories.get (new Integer (widgetType)); if (factory == null) { @@ -293,11 +295,11 @@ class AccessibleFactory { } void removeAccessible (Accessible accessible) { - accessibles.remove (new Integer (accessible.getControlHandle ())); + accessibles.remove (new LONG (accessible.getControlHandle ())); } static void unregisterAccessible (Accessible accessible) { - int controlHandle = accessible.getControlHandle (); + int /*long*/ controlHandle = accessible.getControlHandle (); int widgetType = ATK.G_TYPE_FROM_INSTANCE (controlHandle); AccessibleFactory factory = (AccessibleFactory) Factories.get (new Integer (widgetType)); if (factory != null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java index b92f4b1258..ed1fc14ea2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java @@ -18,7 +18,8 @@ import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.widgets.*; class AccessibleObject { - int handle, parentType, index = -1, id = ACC.CHILDID_SELF; + int /*long*/ handle; + int parentType, index = -1, id = ACC.CHILDID_SELF; Accessible accessible; AccessibleObject parent; Hashtable children = new Hashtable (9); @@ -26,10 +27,10 @@ class AccessibleObject { // to a logical child of a widget (eg.- a CTabItem, which is simply drawn) boolean isLightweight = false; - static int actionNamePtr = -1; - static int descriptionPtr = -1; - static int keybindingPtr = -1; - static int namePtr = -1; + static int /*long*/ actionNamePtr = -1; + static int /*long*/ descriptionPtr = -1; + static int /*long*/ keybindingPtr = -1; + static int /*long*/ namePtr = -1; static final Hashtable AccessibleObjects = new Hashtable (9); static final int ATK_ACTION_TYPE = ATK.g_type_from_name (Converter.wcsToMbcs (null, "AtkAction", true)); static final int ATK_COMPONENT_TYPE = ATK.g_type_from_name (Converter.wcsToMbcs (null, "AtkComponent", true)); @@ -44,20 +45,20 @@ class AccessibleObject { ATK.atk_object_initialize (handle, widget); this.accessible = accessible; this.isLightweight = isLightweight; - AccessibleObjects.put (new Integer (handle), this); + AccessibleObjects.put (new LONG (handle), this); if (DEBUG) System.out.println("new AccessibleObject: " + handle); } void addChild (AccessibleObject child) { - children.put (new Integer (child.handle), child); + children.put (new LONG (child.handle), child); child.setParent (this); } - static int atkAction_get_keybinding (int atkObject, int index) { + static int /*long*/ atkAction_get_keybinding (int /*long*/ atkObject, int /*long*/ index) { if (DEBUG) System.out.println ("-->atkAction_get_keybinding"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; + int /*long*/ parentResult = 0; if (ATK.g_type_is_a (object.parentType, ATK_ACTION_TYPE)) { int superType = ATK.g_type_interface_peek_parent (ATK.ATK_ACTION_GET_IFACE (object.handle)); AtkActionIface actionIface = new AtkActionIface (); @@ -88,11 +89,11 @@ class AccessibleObject { return keybindingPtr; } - static int atkAction_get_name (int atkObject, int index) { + static int /*long*/ atkAction_get_name (int /*long*/ atkObject, int /*long*/ index) { if (DEBUG) System.out.println ("-->atkAction_get_name"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; + int /*long*/ parentResult = 0; if (ATK.g_type_is_a (object.parentType, ATK_ACTION_TYPE)) { int superType = ATK.g_type_interface_peek_parent (ATK.ATK_ACTION_GET_IFACE (object.handle)); AtkActionIface actionIface = new AtkActionIface (); @@ -123,7 +124,7 @@ class AccessibleObject { return actionNamePtr; } - static int atkComponent_get_extents (int atkObject, int x, int y, int width, int height, int coord_type) { + static int /*long*/ atkComponent_get_extents (int /*long*/ atkObject, int /*long*/ x, int /*long*/ y, int /*long*/ width, int /*long*/ height, int /*long*/ coord_type) { if (DEBUG) System.out.println ("-->atkComponent_get_extents"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; @@ -154,11 +155,11 @@ class AccessibleObject { event.width = parentWidth [0]; event.height = parentHeight [0]; if (coord_type == ATK.ATK_XY_WINDOW) { // translate control -> display, for filling in the event to be dispatched - int gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); + int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); GtkAccessible gtkAccessible = new GtkAccessible (); ATK.memmove (gtkAccessible, gtkAccessibleHandle); - int topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); - int window = OS.GTK_WIDGET_WINDOW (topLevel); + int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel); int[] topWindowX = new int [1], topWindowY = new int [1]; OS.gdk_window_get_origin (window, topWindowX, topWindowY); event.x += topWindowX [0]; @@ -169,11 +170,11 @@ class AccessibleObject { } if (coord_type == ATK.ATK_XY_WINDOW) { // translate display -> control, for answering to the OS - int gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); + int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); GtkAccessible gtkAccessible = new GtkAccessible (); ATK.memmove (gtkAccessible, gtkAccessibleHandle); - int topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); - int window = OS.GTK_WIDGET_WINDOW (topLevel); + int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel); int[] topWindowX = new int [1], topWindowY = new int [1]; OS.gdk_window_get_origin (window, topWindowX, topWindowY); event.x -= topWindowX [0]; @@ -186,7 +187,7 @@ class AccessibleObject { return 0; } - static int atkComponent_get_position (int atkObject, int x, int y, int coord_type) { + static int /*long*/ atkComponent_get_position (int /*long*/ atkObject, int /*long*/ x, int /*long*/ y, int /*long*/ coord_type) { if (DEBUG) System.out.println ("-->atkComponent_get_position, object: " + atkObject + " x: " + x + " y: " + y + " coord: " + coord_type); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; @@ -211,11 +212,11 @@ class AccessibleObject { event.x = parentX [0]; event.y = parentY [0]; if (coord_type == ATK.ATK_XY_WINDOW) { // translate control -> display, for filling in the event to be dispatched - int gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); + int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); GtkAccessible gtkAccessible = new GtkAccessible (); ATK.memmove (gtkAccessible, gtkAccessibleHandle); - int topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); - int window = OS.GTK_WIDGET_WINDOW (topLevel); + int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel); int[] topWindowX = new int [1], topWindowY = new int [1]; OS.gdk_window_get_origin (window, topWindowX, topWindowY); event.x += topWindowX [0]; @@ -226,11 +227,11 @@ class AccessibleObject { } if (coord_type == ATK.ATK_XY_WINDOW) { // translate display -> control, for answering to the OS - int gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); + int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); GtkAccessible gtkAccessible = new GtkAccessible (); ATK.memmove (gtkAccessible, gtkAccessibleHandle); - int topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); - int window = OS.GTK_WIDGET_WINDOW (topLevel); + int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel); int[] topWindowX = new int [1], topWindowY = new int [1]; OS.gdk_window_get_origin (window, topWindowX, topWindowY); event.x -= topWindowX [0]; @@ -241,7 +242,7 @@ class AccessibleObject { return 0; } - static int atkComponent_get_size (int atkObject, int width, int height, int coord_type) { + static int /*long*/ atkComponent_get_size (int /*long*/ atkObject, int /*long*/ width, int /*long*/ height, int /*long*/ coord_type) { if (DEBUG) System.out.println ("-->atkComponent_get_size"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; @@ -272,11 +273,11 @@ class AccessibleObject { return 0; } - static int atkComponent_ref_accessible_at_point (int atkObject, int x, int y, int coord_type) { + static int /*long*/ atkComponent_ref_accessible_at_point (int /*long*/ atkObject, int /*long*/ x, int /*long*/ y, int /*long*/ coord_type) { if (DEBUG) System.out.println ("-->atkComponent_ref_accessible_at_point"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; + int /*long*/ parentResult = 0; if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) { int superType = ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle)); AtkComponentIface componentIface = new AtkComponentIface (); @@ -290,14 +291,14 @@ class AccessibleObject { AccessibleControlEvent event = new AccessibleControlEvent (object); event.childID = object.id; - event.x = x; event.y = y; + event.x = (int)/*64*/x; event.y = (int)/*64*/y; if (coord_type == ATK.ATK_XY_WINDOW) { // translate control -> display, for filling in the event to be dispatched - int gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); + int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle); GtkAccessible gtkAccessible = new GtkAccessible (); ATK.memmove (gtkAccessible, gtkAccessibleHandle); - int topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); - int window = OS.GTK_WIDGET_WINDOW (topLevel); + int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget); + int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel); int[] topWindowX = new int [1], topWindowY = new int [1]; OS.gdk_window_get_origin (window, topWindowX, topWindowY); event.x += topWindowX [0]; @@ -316,12 +317,12 @@ class AccessibleObject { return parentResult; } - static int atkObject_get_description (int atkObject) { + static int /*long*/ atkObject_get_description (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkObject_get_description"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ parentResult = 0; + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkObjectClass objectClass = new AtkObjectClass (); ATK.memmove (objectClass, superType); if (objectClass.get_description != 0) { @@ -349,12 +350,12 @@ class AccessibleObject { return descriptionPtr; } - static int atkObject_get_name (int atkObject) { + static int /*long*/ atkObject_get_name (int atkObject) { if (DEBUG) System.out.println ("-->atkObject_get_name: " + atkObject); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ parentResult = 0; + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkObjectClass objectClass = new AtkObjectClass (); ATK.memmove (objectClass, superType); if (objectClass.get_name != 0) { @@ -382,12 +383,12 @@ class AccessibleObject { return namePtr; } - static int atkObject_get_n_children (int atkObject) { + static int /*long*/ atkObject_get_n_children (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkObject_get_n_children: " + atkObject); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ parentResult = 0; + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkObjectClass objectClass = new AtkObjectClass (); ATK.memmove (objectClass, superType); if (objectClass.get_n_children != 0) { @@ -398,38 +399,38 @@ class AccessibleObject { AccessibleControlEvent event = new AccessibleControlEvent (object); event.childID = object.id; - event.detail = parentResult; + event.detail = (int)/*64*/parentResult; for (int i = 0; i < listeners.length; i++) { listeners [i].getChildCount (event); } return event.detail; } - static int atkObject_get_index_in_parent (int atkObject) { + static int /*long*/ atkObject_get_index_in_parent (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkObjectCB_get_index_in_parent. "); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; if (object.index != -1) return object.index; - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkObjectClass objectClass = new AtkObjectClass (); ATK.memmove (objectClass, superType); if (objectClass.get_index_in_parent == 0) return 0; return ATK.call (objectClass.get_index_in_parent,object. handle); } - static int atkObject_get_parent (int atkObject) { + static int /*long*/ atkObject_get_parent (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkObject_get_parent: " + atkObject); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; if (object.parent != null) return object.parent.handle; - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkObjectClass objectClass = new AtkObjectClass (); ATK.memmove (objectClass, superType); if (objectClass.get_parent == 0) return 0; return ATK.call (objectClass.get_parent, object.handle); } - static int atkObject_get_role (int atkObject) { + static int /*long*/ atkObject_get_role (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkObject_get_role: " + atkObject); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; @@ -475,36 +476,36 @@ class AccessibleObject { } } } - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkObjectClass objectClass = new AtkObjectClass (); ATK.memmove (objectClass, superType); if (objectClass.get_role == 0) return 0; return ATK.call (objectClass.get_role, object.handle); } - static int atkObject_ref_child (int atkObject, int index) { + static int /*long*/ atkObject_ref_child (int /*long*/ atkObject, int /*long*/ index) { if (DEBUG) System.out.println ("-->atkObject_ref_child: " + index + " of: " + atkObject); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; object.updateChildren (); - AccessibleObject accObject = object.getChildByIndex (index); + AccessibleObject accObject = object.getChildByIndex ((int)/*64*/index); if (accObject != null) { OS.g_object_ref (accObject.handle); return accObject.handle; } - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkObjectClass objectClass = new AtkObjectClass (); ATK.memmove (objectClass, superType); if (objectClass.ref_child == 0) return 0; return ATK.call (objectClass.ref_child, object.handle, index); } - static int atkObject_ref_state_set (int atkObject) { + static int /*long*/ atkObject_ref_state_set (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkObject_ref_state_set"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ parentResult = 0; + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkObjectClass objectClass = new AtkObjectClass (); ATK.memmove (objectClass, superType); if (objectClass.ref_state_set != 0) { @@ -513,7 +514,7 @@ class AccessibleObject { AccessibleControlListener[] listeners = object.getControlListeners (); if (listeners.length == 0) return parentResult; - int set = parentResult; + int /*long*/ set = parentResult; AccessibleControlEvent event = new AccessibleControlEvent (object); event.childID = object.id; event.detail = -1; @@ -542,11 +543,11 @@ class AccessibleObject { return set; } - static int atkSelection_is_child_selected (int atkObject, int index) { + static int /*long*/ atkSelection_is_child_selected (int /*long*/ atkObject, int /*long*/ index) { if (DEBUG) System.out.println ("-->atkSelection_is_child_selected"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; + int /*long*/ parentResult = 0; if (ATK.g_type_is_a (object.parentType, ATK_SELECTION_TYPE)) { int superType = ATK.g_type_interface_peek_parent (ATK.ATK_SELECTION_GET_IFACE (object.handle)); AtkSelectionIface selectionIface = new AtkSelectionIface (); @@ -570,11 +571,11 @@ class AccessibleObject { return parentResult; } - static int atkSelection_ref_selection (int atkObject, int index) { + static int /*long*/ atkSelection_ref_selection (int /*long*/ atkObject, int /*long*/ index) { if (DEBUG) System.out.println ("-->atkSelection_ref_selection"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; + int /*long*/ parentResult = 0; if (ATK.g_type_is_a (object.parentType, ATK_SELECTION_TYPE)) { int superType = ATK.g_type_interface_peek_parent (ATK.ATK_SELECTION_GET_IFACE (object.handle)); AtkSelectionIface selectionIface = new AtkSelectionIface (); @@ -600,11 +601,11 @@ class AccessibleObject { return parentResult; } - static int atkText_get_caret_offset (int atkObject) { + static int /*long*/ atkText_get_caret_offset (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkText_get_caret_offset"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; + int /*long*/ parentResult = 0; if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) { int superType = ATK.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (object.handle)); AtkTextIface textIface = new AtkTextIface (); @@ -618,21 +619,21 @@ class AccessibleObject { AccessibleTextEvent event = new AccessibleTextEvent (object); event.childID = object.id; - event.offset = parentResult; + event.offset = (int)/*64*/parentResult; for (int i = 0; i < listeners.length; i++) { listeners [i].getCaretOffset (event); } return event.offset; } - static int atkText_get_character_at_offset (int atkObject, int offset) { + static int /*long*/ atkText_get_character_at_offset (int /*long*/ atkObject, int /*long*/ offset) { if (DEBUG) System.out.println ("-->atkText_get_character_at_offset"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; String text = object.getText (); - if (text != null) return (int)text.charAt (offset); // TODO + if (text != null) return (int)text.charAt ((int)/*64*/offset); // TODO if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) { - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkTextIface textIface = new AtkTextIface (); ATK.memmove (textIface, superType); if (textIface.get_character_at_offset != 0) { @@ -642,14 +643,14 @@ class AccessibleObject { return 0; } - static int atkText_get_character_count (int atkObject) { + static int /*long*/ atkText_get_character_count (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkText_get_character_count"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; String text = object.getText (); if (text != null) return text.length (); if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) { - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkTextIface textIface = new AtkTextIface (); ATK.memmove (textIface, superType); if (textIface.get_character_count != 0) { @@ -659,11 +660,11 @@ class AccessibleObject { return 0; } - static int atkText_get_n_selections (int atkObject) { + static int /*long*/ atkText_get_n_selections (int /*long*/ atkObject) { if (DEBUG) System.out.println ("-->atkText_get_n_selections"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; - int parentResult = 0; + int /*long*/ parentResult = 0; if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) { int superType = ATK.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (object.handle)); AtkTextIface textIface = new AtkTextIface (); @@ -683,7 +684,7 @@ class AccessibleObject { return event.length == 0 ? parentResult : 1; } - static int atkText_get_selection (int atkObject, int selection_num, int start_offset, int end_offset) { + static int /*long*/ atkText_get_selection (int /*long*/ atkObject, int /*long*/ selection_num, int /*long*/ start_offset, int /*long*/ end_offset) { if (DEBUG) System.out.println ("-->atkText_get_selection"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; @@ -716,7 +717,7 @@ class AccessibleObject { return 0; } - static int atkText_get_text (int atkObject, int start_offset, int end_offset) { + static int /*long*/ atkText_get_text (int /*long*/ atkObject, int /*long*/ start_offset, int /*long*/ end_offset) { if (DEBUG) System.out.println ("-->atkText_get_text: " + start_offset + "," + end_offset); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; @@ -728,14 +729,14 @@ class AccessibleObject { end_offset = Math.min (end_offset, text.length ()); } start_offset = Math.min (start_offset, end_offset); - text = text.substring (start_offset, end_offset); + text = text.substring ((int)/*64*/start_offset, (int)/*64*/end_offset); byte[] bytes = Converter.wcsToMbcs (null, text, true); - int result = OS.g_malloc (bytes.length); + int /*long*/ result = OS.g_malloc (bytes.length); OS.memmove (result, bytes, bytes.length); return result; } if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) { - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkTextIface textIface = new AtkTextIface (); ATK.memmove (textIface, superType); if (textIface.get_text != 0) { @@ -745,17 +746,18 @@ class AccessibleObject { return 0; } - static int atkText_get_text_after_offset (int atkObject, int offset, int boundary_type, int start_offset, int end_offset) { + static int /*long*/ atkText_get_text_after_offset (int /*long*/ atkObject, int /*long*/ offset_value, int /*long*/ boundary_type, int /*long*/ start_offset, int /*long*/ end_offset) { if (DEBUG) System.out.println ("-->atkText_get_text_after_offset"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; + int offset = (int)/*64*/offset_value; String text = object.getText (); if (text != null) { int length = text.length (); offset = Math.min (offset, length - 1); int startBounds = offset; int endBounds = offset; - switch (boundary_type) { + switch ((int)/*64*/boundary_type) { case ATK.ATK_TEXT_BOUNDARY_CHAR: { if (length > offset) endBounds++; break; @@ -789,7 +791,7 @@ class AccessibleObject { startBounds = endBounds = length; break; } - int wordEnd1 = nextIndexOfChar (text, " !?.\n", offset); + int wordEnd1 = nextIndexOfChar (text, " !?.\n", (int)/*64*/offset); if (wordEnd1 == -1) { startBounds = endBounds = length; break; @@ -910,12 +912,12 @@ class AccessibleObject { OS.memmove (end_offset, new int[] {endBounds}, 4); text = text.substring (startBounds, endBounds); byte[] bytes = Converter.wcsToMbcs (null, text, true); - int result = OS.g_malloc (bytes.length); + int /*long*/ result = OS.g_malloc (bytes.length); OS.memmove (result, bytes, bytes.length); return result; } if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) { - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkTextIface textIface = new AtkTextIface (); ATK.memmove (textIface, superType); if (textIface.get_text_after_offset != 0) { @@ -925,17 +927,18 @@ class AccessibleObject { return 0; } - static int atkText_get_text_at_offset (int atkObject, int offset, int boundary_type, int start_offset, int end_offset) { - if (DEBUG) System.out.println ("-->atkText_get_text_at_offset: " + offset + " start: " + start_offset + " end: " + end_offset); + static int /*long*/ atkText_get_text_at_offset (int /*long*/ atkObject, int /*long*/ offset_value, int /*long*/ boundary_type, int /*long*/ start_offset, int /*long*/ end_offset) { + if (DEBUG) System.out.println ("-->atkText_get_text_at_offset: " + offset_value + " start: " + start_offset + " end: " + end_offset); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; + int offset = (int)/*64*/offset_value; String text = object.getText (); if (text != null) { int length = text.length (); offset = Math.min (offset, length - 1); int startBounds = offset; int endBounds = offset; - switch (boundary_type) { + switch ((int)/*64*/boundary_type) { case ATK.ATK_TEXT_BOUNDARY_CHAR: { if (length > offset) endBounds++; break; @@ -1033,12 +1036,12 @@ class AccessibleObject { OS.memmove (end_offset, new int[] {endBounds}, 4); text = text.substring (startBounds, endBounds); byte[] bytes = Converter.wcsToMbcs (null, text, true); - int result = OS.g_malloc (bytes.length); + int /*long*/ result = OS.g_malloc (bytes.length); OS.memmove (result, bytes, bytes.length); return result; } if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) { - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkTextIface textIface = new AtkTextIface (); ATK.memmove (textIface, superType); if (textIface.get_text_after_offset != 0) { @@ -1048,17 +1051,18 @@ class AccessibleObject { return 0; } - static int atkText_get_text_before_offset (int atkObject, int offset, int boundary_type, int start_offset, int end_offset) { + static int /*long*/ atkText_get_text_before_offset (int /*long*/ atkObject, int /*long*/ offset_value, int /*long*/ boundary_type, int /*long*/ start_offset, int /*long*/ end_offset) { if (DEBUG) System.out.println ("-->atkText_get_text_before_offset"); AccessibleObject object = getAccessibleObject (atkObject); if (object == null) return 0; + int offset = (int)/*64*/offset_value; String text = object.getText (); if (text != null) { int length = text.length (); offset = Math.min (offset, length - 1); int startBounds = offset; int endBounds = offset; - switch (boundary_type) { + switch ((int)/*64*/boundary_type) { case ATK.ATK_TEXT_BOUNDARY_CHAR: { if (length >= offset && offset > 0) startBounds--; break; @@ -1161,12 +1165,12 @@ class AccessibleObject { OS.memmove (end_offset, new int[] {endBounds}, 4); text = text.substring (startBounds, endBounds); byte[] bytes = Converter.wcsToMbcs (null, text, true); - int result = OS.g_malloc (bytes.length); + int /*long*/ result = OS.g_malloc (bytes.length); OS.memmove (result, bytes, bytes.length); return result; } if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) { - int superType = ATK.g_type_class_peek (object.parentType); + int /*long*/ superType = ATK.g_type_class_peek (object.parentType); AtkTextIface textIface = new AtkTextIface (); ATK.memmove (textIface, superType); if (textIface.get_text_before_offset != 0) { @@ -1181,12 +1185,12 @@ class AccessibleObject { return accessible.getAccessibleListeners (); } - static AccessibleObject getAccessibleObject (int atkObject) { - return (AccessibleObject)AccessibleObjects.get (new Integer (atkObject)); + static AccessibleObject getAccessibleObject (int /*long*/ atkObject) { + return (AccessibleObject)AccessibleObjects.get (new LONG (atkObject)); } - AccessibleObject getChildByHandle (int handle) { - return (AccessibleObject) children.get (new Integer (handle)); + AccessibleObject getChildByHandle (int /*long*/ handle) { + return (AccessibleObject) children.get (new LONG (handle)); } AccessibleObject getChildByID (int childId) { @@ -1214,13 +1218,13 @@ class AccessibleObject { } String getText () { - int parentResult = 0; + int /*long*/ parentResult = 0; String parentText = ""; if (ATK.g_type_is_a (parentType, ATK_TEXT_TYPE)) { int superType = ATK.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (handle)); AtkTextIface textIface = new AtkTextIface (); ATK.memmove (textIface, superType); - int characterCount = 0; + int /*long*/ characterCount = 0; if (textIface.get_character_count != 0) { characterCount = ATK.call (textIface.get_character_count, handle); } @@ -1251,8 +1255,8 @@ class AccessibleObject { } static int gObjectClass_finalize (int atkObject) { - int superType = ATK.g_type_class_peek_parent (ATK.G_OBJECT_GET_CLASS (atkObject)); - int gObjectClass = ATK.G_OBJECT_CLASS (superType); + int /*long*/ superType = ATK.g_type_class_peek_parent (ATK.G_OBJECT_GET_CLASS (atkObject)); + int /*long*/ gObjectClass = ATK.G_OBJECT_CLASS (superType); GObjectClass objectClassStruct = new GObjectClass (); ATK.memmove (objectClassStruct, gObjectClass); ATK.call (objectClassStruct.finalize, atkObject); @@ -1320,7 +1324,7 @@ class AccessibleObject { } void removeChild (AccessibleObject child, boolean unref) { - children.remove (new Integer (child.handle)); + children.remove (new LONG (child.handle)); if (unref && child.isLightweight) OS.g_object_unref (child.handle); } @@ -1375,7 +1379,7 @@ class AccessibleObject { AccessibleObject object = getChildByIndex (i); if (object == null) { object = new AccessibleObject (childType, 0, accessible, parentType, true); - AccessibleObjects.put (new Integer (object.handle), object); + AccessibleObjects.put (new LONG (object.handle), object); addChild (object); object.index = i; } @@ -1384,7 +1388,7 @@ class AccessibleObject { } catch (ClassCastException e) { // a non-ID value was given so don't set the ID } - idsToKeep.addElement (new Integer (object.handle)); + idsToKeep.addElement (new LONG (object.handle)); } } else { // an array of Accessible children was answered @@ -1398,7 +1402,7 @@ class AccessibleObject { } if (object != null) { object.index = childIndex++; - idsToKeep.addElement (new Integer (object.handle)); + idsToKeep.addElement (new LONG (object.handle)); } } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c index b9f6e8428c..3bf006376e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c @@ -801,7 +801,7 @@ JNIEXPORT jint JNICALL OS_NATIVE(g_1filename_1from_1utf8) if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL); if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL); if (arg4) lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL); - rc = (jint)g_filename_from_utf8((const gchar *)arg0, arg1, lparg2, lparg3, (GError **)lparg4); + rc = (jint)g_filename_from_utf8((const gchar *)arg0, (gssize)arg1, (gsize *)lparg2, (gsize *)lparg3, (GError **)lparg4); if (arg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0); if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java index 538c63e0ca..8754959d0a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java @@ -89,57 +89,57 @@ public class ATK extends OS { public static final synchronized native int GTypeQuery_sizeof (); /** Native methods */ - public static final synchronized native int ATK_ACTION_GET_IFACE (int obj); - public static final synchronized native int ATK_COMPONENT_GET_IFACE(int atkHandle); - public static final synchronized native int ATK_OBJECT_FACTORY_CLASS (int klass); - public static final synchronized native int ATK_SELECTION_GET_IFACE (int obj); - public static final synchronized native int ATK_TEXT_GET_IFACE (int handle); - public static final synchronized native int G_OBJECT_CLASS (int klass); - public static final synchronized native int G_OBJECT_GET_CLASS (int object); - public static final synchronized native int G_TYPE_FROM_INSTANCE (int instance); - public static final synchronized native int GTK_ACCESSIBLE (int handle); - public static final synchronized native void atk_focus_tracker_notify (int object); - public static final synchronized native int atk_get_default_registry (); - public static final synchronized native int atk_object_factory_get_accessible_type (int factory); - public static final synchronized native void atk_object_initialize (int accessible, int data); - public static final synchronized native int atk_registry_get_factory (int registry, int type); - public static final synchronized native void atk_registry_set_factory_type (int registry, int type, int factory_type); - public static final synchronized native boolean atk_state_set_add_state (int set, int type); - public static final synchronized native int atk_state_set_new (); - public static final synchronized native int call (int function, int arg0); - public static final synchronized native int call (int function, int arg0, int arg1); - public static final synchronized native int call (int function, int arg0, int arg1, int arg2); - public static final synchronized native int call (int function, int arg0, int arg1, int arg2, int arg3); - public static final synchronized native int call (int function, int arg0, int arg1, int arg2, int arg3, int arg4); - public static final synchronized native int call (int function, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5); - public static final synchronized native int g_object_new (int type, int first_property_name); - public static final synchronized native void g_type_add_interface_static (int instance_type, int interface_type, int info); - public static final synchronized native int g_type_class_peek (int g_class); - public static final synchronized native int g_type_class_peek_parent (int g_class); + public static final synchronized native int /*long*/ ATK_ACTION_GET_IFACE (int /*long*/ obj); + public static final synchronized native int /*long*/ ATK_COMPONENT_GET_IFACE(int /*long*/ atkHandle); + public static final synchronized native int /*long*/ ATK_OBJECT_FACTORY_CLASS (int /*long*/ klass); + public static final synchronized native int /*long*/ ATK_SELECTION_GET_IFACE (int /*long*/ obj); + public static final synchronized native int /*long*/ ATK_TEXT_GET_IFACE (int /*long*/ handle); + public static final synchronized native int /*long*/ G_OBJECT_CLASS (int /*long*/ klass); + public static final synchronized native int /*long*/ G_OBJECT_GET_CLASS (int /*long*/ object); + public static final synchronized native int G_TYPE_FROM_INSTANCE (int /*long*/ instance); + public static final synchronized native int /*long*/ GTK_ACCESSIBLE (int /*long*/ handle); + public static final synchronized native void atk_focus_tracker_notify (int /*long*/ object); + public static final synchronized native int /*long*/ atk_get_default_registry (); + public static final synchronized native int atk_object_factory_get_accessible_type (int /*long*/ factory); + public static final synchronized native void atk_object_initialize (int /*long*/ accessible, int /*long*/ data); + public static final synchronized native int /*long*/ atk_registry_get_factory (int /*long*/ registry, int /*long*/ type); + public static final synchronized native void atk_registry_set_factory_type (int /*long*/ registry, int type, int factory_type); + public static final synchronized native boolean atk_state_set_add_state (int /*long*/ set, int type); + public static final synchronized native int /*long*/ atk_state_set_new (); + public static final synchronized native int /*long*/ call (int /*long*/ function, int /*long*/ arg0); + public static final synchronized native int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1); + public static final synchronized native int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2); + public static final synchronized native int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3); + public static final synchronized native int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4); + public static final synchronized native int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5); + public static final synchronized native int /*long*/ g_object_new (int /*long*/ type, int /*long*/ first_property_name); + public static final synchronized native void g_type_add_interface_static (int instance_type, int interface_type, int /*long*/ info); + public static final synchronized native int /*long*/ g_type_class_peek (int /*long*/ g_class); + public static final synchronized native int /*long*/ g_type_class_peek_parent (int /*long*/ g_class); public static final synchronized native int g_type_from_name (byte[] name); - public static final synchronized native int g_type_interface_peek_parent (int iface); + public static final synchronized native int g_type_interface_peek_parent (int /*long*/ iface); public static final synchronized native boolean g_type_is_a (int type, int is_a_type); - public static final synchronized native int g_type_name (int handle); + public static final synchronized native int /*long*/ g_type_name (int /*long*/ handle); public static final synchronized native int g_type_parent (int type); - public static final synchronized native void g_type_query (int type, int query); - public static final synchronized native int g_type_register_static (int parent_type, byte[] type_name, int info, int flags); - public static final synchronized native int gtk_widget_get_toplevel (int widget); - public static final synchronized native void memmove (AtkActionIface dest, int src); - public static final synchronized native void memmove (AtkComponentIface dest, int src); - public static final synchronized native void memmove (AtkObjectClass dest, int src); - public static final synchronized native void memmove (AtkObjectFactoryClass dest, int src); - public static final synchronized native void memmove (AtkSelectionIface dest, int src); - public static final synchronized native void memmove (AtkTextIface dest, int src); - public static final synchronized native void memmove (GtkAccessible dest, int src); - public static final synchronized native void memmove (GObjectClass dest, int src); - public static final synchronized native void memmove (GTypeQuery dest, int src, int size); - public static final synchronized native void memmove (int dest, AtkActionIface src); - public static final synchronized native void memmove (int dest, AtkComponentIface src); - public static final synchronized native void memmove (int dest, AtkObjectClass src); - public static final synchronized native void memmove (int dest, AtkObjectFactoryClass src); - public static final synchronized native void memmove (int dest, AtkSelectionIface src); - public static final synchronized native void memmove (int dest, AtkTextIface src); - public static final synchronized native void memmove (int dest, GInterfaceInfo src, int size); - public static final synchronized native void memmove (int dest, GObjectClass src); - public static final synchronized native void memmove (int dest, GTypeInfo src, int size); + public static final synchronized native void g_type_query (int type, int /*long*/ query); + public static final synchronized native int g_type_register_static (int parent_type, byte[] type_name, int /*long*/ info, int flags); + public static final synchronized native int /*long*/ gtk_widget_get_toplevel (int /*long*/ widget); + public static final synchronized native void memmove (AtkActionIface dest, int /*long*/ src); + public static final synchronized native void memmove (AtkComponentIface dest, int /*long*/ src); + public static final synchronized native void memmove (AtkObjectClass dest, int /*long*/ src); + public static final synchronized native void memmove (AtkObjectFactoryClass dest, int /*long*/ src); + public static final synchronized native void memmove (AtkSelectionIface dest, int /*long*/ src); + public static final synchronized native void memmove (AtkTextIface dest, int /*long*/ src); + public static final synchronized native void memmove (GtkAccessible dest, int /*long*/ src); + public static final synchronized native void memmove (GObjectClass dest, int /*long*/ src); + public static final synchronized native void memmove (GTypeQuery dest, int /*long*/ src, int size); + public static final synchronized native void memmove (int /*long*/ dest, AtkActionIface src); + public static final synchronized native void memmove (int /*long*/ dest, AtkComponentIface src); + public static final synchronized native void memmove (int /*long*/ dest, AtkObjectClass src); + public static final synchronized native void memmove (int /*long*/ dest, AtkObjectFactoryClass src); + public static final synchronized native void memmove (int /*long*/ dest, AtkSelectionIface src); + public static final synchronized native void memmove (int /*long*/ dest, AtkTextIface src); + public static final synchronized native void memmove (int /*long*/ dest, GInterfaceInfo src, int size); + public static final synchronized native void memmove (int /*long*/ dest, GObjectClass src); + public static final synchronized native void memmove (int /*long*/ dest, GTypeInfo src, int size); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkActionIface.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkActionIface.java index 5b81400492..a06dd443c5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkActionIface.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkActionIface.java @@ -14,12 +14,12 @@ package org.eclipse.swt.internal.accessibility.gtk; public class AtkActionIface { // GTypeInterface parent; - public int do_action; - public int get_n_actions; - public int get_description; - public int get_name; - public int get_keybinding; - public int set_description; + public int /*long*/ do_action; + public int /*long*/ get_n_actions; + public int /*long*/ get_description; + public int /*long*/ get_name; + public int /*long*/ get_keybinding; + public int /*long*/ set_description; // AtkFunction pad1; // AtkFunction pad2; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkComponentIface.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkComponentIface.java index 83f5da28ab..72898704ce 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkComponentIface.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkComponentIface.java @@ -13,17 +13,17 @@ package org.eclipse.swt.internal.accessibility.gtk; public class AtkComponentIface { - public int add_focus_handler; - public int contains; - public int ref_accessible_at_point; - public int get_extents; - public int get_position; - public int get_size; - public int grab_focus; - public int remove_focus_handler; - public int set_extents; - public int set_position; - public int set_size; - public int get_layer; - public int get_mdi_zorder; + public int /*long*/ add_focus_handler; + public int /*long*/ contains; + public int /*long*/ ref_accessible_at_point; + public int /*long*/ get_extents; + public int /*long*/ get_position; + public int /*long*/ get_size; + public int /*long*/ grab_focus; + public int /*long*/ remove_focus_handler; + public int /*long*/ set_extents; + public int /*long*/ set_position; + public int /*long*/ set_size; + public int /*long*/ get_layer; + public int /*long*/ get_mdi_zorder; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectClass.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectClass.java index 569e5318cb..812bc3f60a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectClass.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectClass.java @@ -13,27 +13,27 @@ package org.eclipse.swt.internal.accessibility.gtk; public class AtkObjectClass { - public int get_name; - public int get_description; - public int get_parent; - public int get_n_children; - public int ref_child; - public int get_index_in_parent; - public int ref_relation_set; - public int get_role; - public int get_layer; - public int get_mdi_zorder; - public int ref_state_set; - public int set_name; - public int set_description; - public int set_parent; - public int set_role; - public int connect_property_change_handler; - public int remove_property_change_handler; - public int initialize; - public int children_changed; - public int focus_event; - public int property_change; - public int state_change; - public int visible_data_changed; + public int /*long*/ get_name; + public int /*long*/ get_description; + public int /*long*/ get_parent; + public int /*long*/ get_n_children; + public int /*long*/ ref_child; + public int /*long*/ get_index_in_parent; + public int /*long*/ ref_relation_set; + public int /*long*/ get_role; + public int /*long*/ get_layer; + public int /*long*/ get_mdi_zorder; + public int /*long*/ ref_state_set; + public int /*long*/ set_name; + public int /*long*/ set_description; + public int /*long*/ set_parent; + public int /*long*/ set_role; + public int /*long*/ connect_property_change_handler; + public int /*long*/ remove_property_change_handler; + public int /*long*/ initialize; + public int /*long*/ children_changed; + public int /*long*/ focus_event; + public int /*long*/ property_change; + public int /*long*/ state_change; + public int /*long*/ visible_data_changed; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java index c2bf0d997e..4cb8769e3e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java @@ -13,7 +13,7 @@ package org.eclipse.swt.internal.accessibility.gtk; public class AtkObjectFactoryClass { - public int create_accessible; - public int invalidate; - public int get_accessible_type; + public int /*long*/ create_accessible; + public int /*long*/ invalidate; + public int /*long*/ get_accessible_type; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkSelectionIface.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkSelectionIface.java index 086a351306..348fbb78d3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkSelectionIface.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkSelectionIface.java @@ -13,12 +13,12 @@ package org.eclipse.swt.internal.accessibility.gtk; public class AtkSelectionIface { - public int add_selection; - public int clear_selection; - public int ref_selection; - public int get_selection_count; - public int is_child_selected; - public int remove_selection; - public int select_all_selection; - public int selection_changed; + public int /*long*/ add_selection; + public int /*long*/ clear_selection; + public int /*long*/ ref_selection; + public int /*long*/ get_selection_count; + public int /*long*/ is_child_selected; + public int /*long*/ remove_selection; + public int /*long*/ select_all_selection; + public int /*long*/ selection_changed; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java index 1470c1df63..c40ab9844f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java @@ -13,24 +13,24 @@ package org.eclipse.swt.internal.accessibility.gtk; public class AtkTextIface { - public int get_text; - public int get_text_after_offset; - public int get_text_at_offset; - public int get_character_at_offset; - public int get_text_before_offset; - public int get_caret_offset; - public int get_run_attributes; - public int get_default_attributes; - public int get_character_extents; - public int get_character_count; - public int get_offset_at_point; - public int get_n_selections; - public int get_selection; - public int add_selection; - public int remove_selection; - public int set_selection; - public int set_caret_offset; - public int text_changed; - public int text_caret_moved; - public int text_selection_changed; + public int /*long*/ get_text; + public int /*long*/ get_text_after_offset; + public int /*long*/ get_text_at_offset; + public int /*long*/ get_character_at_offset; + public int /*long*/ get_text_before_offset; + public int /*long*/ get_caret_offset; + public int /*long*/ get_run_attributes; + public int /*long*/ get_default_attributes; + public int /*long*/ get_character_extents; + public int /*long*/ get_character_count; + public int /*long*/ get_offset_at_point; + public int /*long*/ get_n_selections; + public int /*long*/ get_selection; + public int /*long*/ add_selection; + public int /*long*/ remove_selection; + public int /*long*/ set_selection; + public int /*long*/ set_caret_offset; + public int /*long*/ text_changed; + public int /*long*/ text_caret_moved; + public int /*long*/ text_selection_changed; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GInterfaceInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GInterfaceInfo.java index 91e4d00945..a654dad0f0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GInterfaceInfo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GInterfaceInfo.java @@ -13,8 +13,8 @@ package org.eclipse.swt.internal.accessibility.gtk; public class GInterfaceInfo { - public int interface_init; - public int interface_finalize; - public int interface_data; + public int /*long*/ interface_init; + public int /*long*/ interface_finalize; + public int /*long*/ interface_data; public static final int sizeof = ATK.GInterfaceInfo_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GObjectClass.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GObjectClass.java index b297666657..7c9cf1a0c4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GObjectClass.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GObjectClass.java @@ -13,11 +13,11 @@ package org.eclipse.swt.internal.accessibility.gtk; public class GObjectClass { - public int constructor; - public int set_property; - public int get_property; - public int dispose; - public int finalize; - public int dispatch_properties_changed; - public int notify; + public int /*long*/ constructor; + public int /*long*/ set_property; + public int /*long*/ get_property; + public int /*long*/ dispose; + public int /*long*/ finalize; + public int /*long*/ dispatch_properties_changed; + public int /*long*/ notify; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GTypeInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GTypeInfo.java index 78b74d64b4..a93fa79841 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GTypeInfo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GTypeInfo.java @@ -14,14 +14,14 @@ package org.eclipse.swt.internal.accessibility.gtk; public class GTypeInfo { public short class_size; - public int base_init; - public int base_finalize; - public int class_init; - public int class_finalize; - public int class_data; + public int /*long*/ base_init; + public int /*long*/ base_finalize; + public int /*long*/ class_init; + public int /*long*/ class_finalize; + public int /*long*/ class_data; public short instance_size; public short n_preallocs; - public int instance_init; - public int value_table; + public int /*long*/ instance_init; + public int /*long*/ value_table; public static final int sizeof = ATK.GTypeInfo_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GTypeQuery.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GTypeQuery.java index de2e84da12..0998fbc301 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GTypeQuery.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GTypeQuery.java @@ -14,7 +14,7 @@ package org.eclipse.swt.internal.accessibility.gtk; public class GTypeQuery { public int type; - public int type_name; + public int /*long*/ type_name; public int class_size; public int instance_size; public static final int sizeof = ATK.GTypeQuery_sizeof(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GtkAccessible.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GtkAccessible.java index 9b469db859..7995b2e7c6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GtkAccessible.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/GtkAccessible.java @@ -13,5 +13,5 @@ package org.eclipse.swt.internal.accessibility.gtk; public class GtkAccessible { - public int widget; + public int /*long*/ widget; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/LONG.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/LONG.java new file mode 100644 index 0000000000..8fa2db235a --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/LONG.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. All rights reserved. + * The contents of this file are made available under the terms + * of the GNU Lesser General Public License (LGPL) Version 2.1 that + * accompanies this distribution (lgpl-v21.txt). The LGPL is also + * available at http://www.gnu.org/licenses/lgpl.html. If the version + * of the LGPL at http://www.gnu.org is different to the version of + * the LGPL accompanying this distribution and there is any conflict + * between the two license versions, the terms of the LGPL accompanying + * this distribution shall govern. + *******************************************************************************/ +package org.eclipse.swt.internal.gtk; + +public class LONG { + public int /*long*/ value; + + public LONG(int /*long*/ value) { + this.value = value; + } + + public boolean equals (Object object) { + if (object == this) return true; + if (!(object instanceof LONG)) return false; + LONG obj = (LONG)object; + return (obj.value == this.value); + } + + public int hashCode () { + return (int)/*64*/value; + } +} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index 6e3c5c68d7..05499bc9ef 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -540,7 +540,7 @@ public static final synchronized native int /*long*/ gdk_pixmap_new(int /*long*/ public static final synchronized native int gdk_pointer_grab(int /*long*/ window, boolean owner_events, int event_mask, int /*long*/ confine_to, int /*long*/ cursor, int time); public static final synchronized native boolean gdk_pointer_is_grabbed(); public static final synchronized native void gdk_pointer_ungrab(int time); -public static final synchronized native boolean gdk_property_get(int /*long*/ window, int /*long*/ property, int /*long*/ type, int offset, int length, int pdelete, int /*long*/[] actual_property_type, int /*long*/[] actual_format, int /*long*/[] actual_length, int /*long*/[] data); +public static final synchronized native boolean gdk_property_get(int /*long*/ window, int /*long*/ property, int /*long*/ type, int /*long*/ offset, int /*long*/ length, int pdelete, int /*long*/[] actual_property_type, int[] actual_format, int[] actual_length, int /*long*/[] data); public static final synchronized native void gdk_region_destroy(int /*long*/ region); public static final synchronized native boolean gdk_region_empty(int /*long*/ region); public static final synchronized native void gdk_region_get_clipbox(int /*long*/ region, GdkRectangle rectangle); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java index 02f67d4d3d..989250d8b4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java @@ -112,7 +112,7 @@ public Printer(PrinterData data) { * @param data the platform specific GC data * @return the platform specific GC handle */ -public int internal_new_GC(GCData data) { +public int /*long*/ internal_new_GC(GCData data) { return 0; } @@ -129,7 +129,7 @@ public int internal_new_GC(GCData data) { * @param handle the platform specific GC handle * @param data the platform specific GC data */ -public void internal_dispose_GC(int xGC, GCData data) { +public void internal_dispose_GC(int /*long*/ xGC, GCData data) { } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java index b2d57afcc5..3ea71a801c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java @@ -204,7 +204,7 @@ static Hashtable gnome_getMimeInfo(Display display) { int[] mimeData = new int[1]; int[] extensionData = new int[1]; int mimeList = GNOME.gnome_vfs_get_registered_mime_types(); - int mimeElement = mimeList; + int /*long*/ mimeElement = mimeList; while (mimeElement != 0) { OS.memmove (mimeData, mimeElement, 4); int mimePtr = mimeData[0]; @@ -215,7 +215,7 @@ static Hashtable gnome_getMimeInfo(Display display) { int extensionList = GNOME.gnome_vfs_mime_get_extensions_list(mimePtr); if (extensionList != 0) { Vector extensions = new Vector(); - int extensionElement = extensionList; + int /*long*/ extensionElement = extensionList; while (extensionElement != 0) { OS.memmove(extensionData, extensionElement, 4); int extensionPtr = extensionData[0]; @@ -298,12 +298,12 @@ static boolean isGnomeDesktop() { * property on the root window. */ byte[] name = Converter.wcsToMbcs(null, "_WIN_SUPPORTING_WM_CHECK", true); - int atom = OS.gdk_atom_intern(name, true); + int /*long*/ atom = OS.gdk_atom_intern(name, true); if (atom == OS.GDK_NONE) return false; - int[] actualType = new int[1]; + int /*long*/[] actualType = new int /*long*/[1]; int[] actualFormat = new int[1]; int[] actualLength = new int[1]; - int[] data = new int[1]; + int /*long*/[] data = new int /*long*/[1]; if (!OS.gdk_property_get(OS.GDK_ROOT_PARENT(), atom, OS.XA_CARDINAL, 0, 1, 0, actualType, actualFormat, actualLength, data)) return false; if (data[0] != 0) OS.g_free(data[0]); |