diff options
author | Alexander Kurtakov | 2018-09-12 10:44:39 +0000 |
---|---|---|
committer | Eric Williams | 2018-09-12 15:14:16 +0000 |
commit | 293f8acff257cfd14c8b17937489fc1cd22273b0 (patch) | |
tree | 8fb38223ad7bc428031036ae989874062ffb48f3 | |
parent | 6dd7b5f2cbf6cf54d60b4a4a125d0ae08fb934c9 (diff) | |
download | eclipse.platform.swt-293f8acff257cfd14c8b17937489fc1cd22273b0.tar.gz eclipse.platform.swt-293f8acff257cfd14c8b17937489fc1cd22273b0.tar.xz eclipse.platform.swt-293f8acff257cfd14c8b17937489fc1cd22273b0.zip |
Bug 530841: [GTK2] Remove GTK 2.x support
Drop GTK2 support in accessibility implementation.
Change-Id: If0d87cf4a0a25cc03983f356c5f47a27214eaa2f
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
15 files changed, 48 insertions, 1149 deletions
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 d3b7cdeb95..5065b925d2 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 @@ -117,13 +117,9 @@ public class Accessible { Accessible (Control control) { super (); this.control = control; - if (GTK.GTK3) { - long /*int*/ type = OS.G_OBJECT_TYPE (getControlHandle()); - accessibleObject = new AccessibleObject (type, getControlHandle(), this, false); - addRelations(); - } else { - AccessibleFactory.registerAccessible (this); - } + long /*int*/ type = OS.G_OBJECT_TYPE (getControlHandle()); + accessibleObject = new AccessibleObject (type, getControlHandle(), this, false); + addRelations(); } /** @@ -483,23 +479,13 @@ public class Accessible { AccessibleObject getAccessibleObject () { if (accessibleObject == null) { - if (GTK.GTK3) { - long /*int*/ widget = this.getControlHandle(); - long /*int*/ type = OS.G_OBJECT_TYPE (widget); - if (parent == null) { - accessibleObject = new AccessibleObject (type, widget, this, false); - } else { - accessibleObject = new AccessibleObject (type, 0, this, true); - accessibleObject.parent = parent.getAccessibleObject(); - } + long /*int*/ widget = this.getControlHandle(); + long /*int*/ type = OS.G_OBJECT_TYPE (widget); + if (parent == null) { + accessibleObject = new AccessibleObject (type, widget, this, false); } else { - if (parent == null) { - AccessibleFactory.createAccessible(this); - } else { - accessibleObject = AccessibleFactory.createChildAccessible(this, ACC.CHILDID_SELF); - accessibleObject.parent = parent.getAccessibleObject(); - } - + accessibleObject = new AccessibleObject (type, 0, this, true); + accessibleObject.parent = parent.getAccessibleObject(); } } return accessibleObject; @@ -538,7 +524,6 @@ public class Accessible { * @noreference This method is not intended to be referenced by clients. */ public void internal_dispose_Accessible() { - if (!GTK.GTK3) AccessibleFactory.unregisterAccessible (Accessible.this); release (); } 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 deleted file mode 100644 index e010041e0e..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java +++ /dev/null @@ -1,636 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.swt.accessibility; - - -import java.util.*; - -import org.eclipse.swt.*; -import org.eclipse.swt.internal.*; -import org.eclipse.swt.internal.accessibility.gtk.*; -import org.eclipse.swt.internal.gtk.*; - -class AccessibleFactory { - static final Map<LONG, Accessible> Accessibles = new HashMap<> (9); - static final Map<LONG, LONG> Factories = new HashMap<> (9); - static final String SWT_TYPE_PREFIX = "SWTAccessible"; //$NON-NLS-1$ - static final String CHILD_TYPENAME = "Child"; //$NON-NLS-1$ - static final String FACTORY_TYPENAME = "SWTFactory"; //$NON-NLS-1$ - static final int[] actionRoles = { - ACC.ROLE_CHECKBUTTON, ACC.ROLE_COMBOBOX, ACC.ROLE_LINK, - ACC.ROLE_MENUITEM, ACC.ROLE_PUSHBUTTON, ACC.ROLE_RADIOBUTTON, - ACC.ROLE_SPLITBUTTON, ACC.ROLE_SPINBUTTON, - ACC.ROLE_CHECKMENUITEM, ACC.ROLE_RADIOMENUITEM, - }; - static final int[] editableTextRoles = { - ACC.ROLE_TEXT, ACC.ROLE_COMBOBOX, ACC.ROLE_PARAGRAPH, ACC.ROLE_DOCUMENT, - }; - static final int[] hypertextRoles = { - ACC.ROLE_TEXT, ACC.ROLE_LINK, ACC.ROLE_PARAGRAPH, - }; - static final int[] selectionRoles = { - ACC.ROLE_LIST, ACC.ROLE_TABFOLDER, ACC.ROLE_TABLE, ACC.ROLE_TREE, - }; - static final int[] textRoles = { - ACC.ROLE_COMBOBOX, ACC.ROLE_LINK, ACC.ROLE_LABEL, ACC.ROLE_TEXT, ACC.ROLE_STATUSBAR, - ACC.ROLE_PARAGRAPH, ACC.ROLE_DOCUMENT, - }; - static final int[] tableRoles = { - ACC.ROLE_TABLE, ACC.ROLE_TREE, - }; - static final int[] valueRoles = { - ACC.ROLE_SCROLLBAR, ACC.ROLE_SPINBUTTON, ACC.ROLE_PROGRESSBAR, - }; - - /* Action callbacks */ - static final Callback AtkActionCB_do_action; - static final Callback AtkActionCB_get_n_actions; - static final Callback AtkActionCB_get_description; - static final Callback AtkActionCB_get_keybinding; - static final Callback AtkActionCB_get_name; - - /* Component callbacks */ - static final Callback AtkComponentCB_get_extents; - static final Callback AtkComponentCB_get_position; - static final Callback AtkComponentCB_get_size; - static final Callback AtkComponentCB_ref_accessible_at_point; - - /* EditableText callbacks */ - static final Callback AtkEditableTextCB_set_run_attributes; - static final Callback AtkEditableTextCB_set_text_contents; - static final Callback AtkEditableTextCB_insert_text; - static final Callback AtkEditableTextCB_copy_text; - static final Callback AtkEditableTextCB_cut_text; - static final Callback AtkEditableTextCB_delete_text; - static final Callback AtkEditableTextCB_paste_text; - - /* Hypertext callbacks */ - static final Callback AtkHypertextCB_get_link; - static final Callback AtkHypertextCB_get_n_links; - static final Callback AtkHypertextCB_get_link_index; - - /* Object callbacks */ - static final Callback AtkObjectCB_get_description; - static final Callback AtkObjectCB_get_index_in_parent; - static final Callback AtkObjectCB_get_n_children; - static final Callback AtkObjectCB_get_name; - static final Callback AtkObjectCB_get_parent; - static final Callback AtkObjectCB_get_role; - static final Callback AtkObjectCB_ref_child; - static final Callback AtkObjectCB_ref_state_set; - static final Callback AtkObjectCB_get_attributes; - - /* Selection callbacks */ - static final Callback AtkSelectionCB_is_child_selected; - static final Callback AtkSelectionCB_ref_selection; - - /* Table callbacks */ - static final Callback AtkTableCB_ref_at; - static final Callback AtkTableCB_get_index_at; - static final Callback AtkTableCB_get_column_at_index; - static final Callback AtkTableCB_get_row_at_index; - static final Callback AtkTableCB_get_n_columns; - static final Callback AtkTableCB_get_n_rows; - static final Callback AtkTableCB_get_column_extent_at; - static final Callback AtkTableCB_get_row_extent_at; - static final Callback AtkTableCB_get_summary; - static final Callback AtkTableCB_get_caption; - static final Callback AtkTableCB_get_column_description; - static final Callback AtkTableCB_get_row_description; - static final Callback AtkTableCB_get_column_header; - static final Callback AtkTableCB_get_row_header; - static final Callback AtkTableCB_get_selected_columns; - static final Callback AtkTableCB_get_selected_rows; - static final Callback AtkTableCB_is_column_selected; - static final Callback AtkTableCB_is_row_selected; - static final Callback AtkTableCB_is_selected; - static final Callback AtkTableCB_add_column_selection; - static final Callback AtkTableCB_add_row_selection; - static final Callback AtkTableCB_remove_column_selection; - static final Callback AtkTableCB_remove_row_selection; - - /* Text callbacks */ - static final Callback AtkTextCB_get_character_extents; - static final Callback AtkTextCB_get_range_extents; - static final Callback AtkTextCB_get_run_attributes; - static final Callback AtkTextCB_get_offset_at_point; - static final Callback AtkTextCB_add_selection; - static final Callback AtkTextCB_remove_selection; - static final Callback AtkTextCB_set_selection; - static final Callback AtkTextCB_get_caret_offset; - static final Callback AtkTextCB_set_caret_offset; - static final Callback AtkTextCB_get_n_selections; - static final Callback AtkTextCB_get_selection; - static final Callback AtkTextCB_get_text; - static final Callback AtkTextCB_get_text_after_offset; - static final Callback AtkTextCB_get_text_at_offset; - static final Callback AtkTextCB_get_text_before_offset; - static final Callback AtkTextCB_get_character_at_offset; - static final Callback AtkTextCB_get_character_count; - static final Callback AtkTextCB_get_bounded_ranges; - - /* Value callbacks */ - static final Callback AtkValueCB_get_current_value; - static final Callback AtkValueCB_get_maximum_value; - static final Callback AtkValueCB_get_minimum_value; - static final Callback AtkValueCB_set_current_value; - - static final Callback GObjectClass_finalize; - static final Callback AtkObjectFactoryCB_create_accessible; - - /* interface initialization callbacks */ - static final Callback InitActionIfaceCB; - static final Callback InitComponentIfaceCB; - static final Callback InitEditableTextIfaceCB; - static final Callback InitHypertextIfaceCB; - static final Callback GTypeInfo_base_init_type; - static final Callback InitSelectionIfaceCB; - static final Callback InitTableIfaceCB; - static final Callback InitTextIfaceCB; - static final Callback InitValueIfaceCB; - static final Callback GTypeInfo_base_init_factory; - /* interface definitions */ - static final long /*int*/ ActionIfaceDefinition; - static final long /*int*/ ComponentIfaceDefinition; - static final long /*int*/ EditableTextIfaceDefinition; - static final long /*int*/ HypertextIfaceDefinition; - static final long /*int*/ SelectionIfaceDefinition; - static final long /*int*/ TableIfaceDefinition; - static final long /*int*/ TextIfaceDefinition; - static final long /*int*/ ValueIfaceDefinition; - static { - AtkActionCB_do_action = newCallback (AccessibleObject.class, "atkAction_do_action", 2); //$NON-NLS-1$ - AtkActionCB_get_n_actions = newCallback (AccessibleObject.class, "atkAction_get_n_actions", 1); //$NON-NLS-1$ - AtkActionCB_get_description = newCallback (AccessibleObject.class, "atkAction_get_description", 2); //$NON-NLS-1$ - AtkActionCB_get_keybinding = newCallback (AccessibleObject.class, "atkAction_get_keybinding", 2); //$NON-NLS-1$ - AtkActionCB_get_name = newCallback (AccessibleObject.class, "atkAction_get_name", 2); //$NON-NLS-1$ - AtkComponentCB_get_extents = newCallback (AccessibleObject.class, "atkComponent_get_extents", 6); //$NON-NLS-1$ - AtkComponentCB_get_position = newCallback (AccessibleObject.class, "atkComponent_get_position", 4); //$NON-NLS-1$ - AtkComponentCB_get_size = newCallback (AccessibleObject.class, "atkComponent_get_size", 4); //$NON-NLS-1$ - AtkComponentCB_ref_accessible_at_point = newCallback (AccessibleObject.class, "atkComponent_ref_accessible_at_point", 4); //$NON-NLS-1$ - AtkEditableTextCB_set_run_attributes = newCallback (AccessibleObject.class, "atkEditableText_set_run_attributes", 4); //$NON-NLS-1$ - AtkEditableTextCB_set_text_contents = newCallback (AccessibleObject.class, "atkEditableText_set_text_contents", 2); //$NON-NLS-1$ - AtkEditableTextCB_insert_text = newCallback (AccessibleObject.class, "atkEditableText_insert_text", 4); //$NON-NLS-1$ - AtkEditableTextCB_copy_text = newCallback (AccessibleObject.class, "atkEditableText_copy_text", 3); //$NON-NLS-1$ - AtkEditableTextCB_cut_text = newCallback (AccessibleObject.class, "atkEditableText_cut_text", 3); //$NON-NLS-1$ - AtkEditableTextCB_delete_text = newCallback (AccessibleObject.class, "atkEditableText_delete_text", 3); //$NON-NLS-1$ - AtkEditableTextCB_paste_text = newCallback (AccessibleObject.class, "atkEditableText_paste_text", 2); //$NON-NLS-1$ - AtkHypertextCB_get_link = newCallback (AccessibleObject.class, "atkHypertext_get_link", 2); //$NON-NLS-1$ - AtkHypertextCB_get_n_links = newCallback (AccessibleObject.class, "atkHypertext_get_n_links", 1); //$NON-NLS-1$ - AtkHypertextCB_get_link_index = newCallback (AccessibleObject.class, "atkHypertext_get_link_index", 2); //$NON-NLS-1$ - AtkObjectCB_get_name = newCallback (AccessibleObject.class, "atkObject_get_name", 1); //$NON-NLS-1$ - AtkObjectCB_get_description = newCallback (AccessibleObject.class, "atkObject_get_description", 1); //$NON-NLS-1$ - AtkObjectCB_get_n_children = newCallback (AccessibleObject.class, "atkObject_get_n_children", 1); //$NON-NLS-1$ - AtkObjectCB_get_role = newCallback (AccessibleObject.class, "atkObject_get_role", 1); //$NON-NLS-1$ - AtkObjectCB_get_parent = newCallback (AccessibleObject.class, "atkObject_get_parent", 1); //$NON-NLS-1$ - AtkObjectCB_ref_state_set = newCallback (AccessibleObject.class, "atkObject_ref_state_set", 1); //$NON-NLS-1$ - AtkObjectCB_get_index_in_parent = newCallback (AccessibleObject.class, "atkObject_get_index_in_parent", 1); //$NON-NLS-1$ - AtkObjectCB_ref_child = newCallback (AccessibleObject.class, "atkObject_ref_child", 2); //$NON-NLS-1$ - AtkObjectCB_get_attributes = newCallback (AccessibleObject.class, "atkObject_get_attributes", 1); //$NON-NLS-1$ - AtkSelectionCB_is_child_selected = newCallback (AccessibleObject.class, "atkSelection_is_child_selected", 2); //$NON-NLS-1$ - AtkSelectionCB_ref_selection = newCallback (AccessibleObject.class, "atkSelection_ref_selection", 2); //$NON-NLS-1$ - AtkTableCB_ref_at = newCallback (AccessibleObject.class, "atkTable_ref_at", 3); //$NON-NLS-1$ - AtkTableCB_get_index_at = newCallback (AccessibleObject.class, "atkTable_get_index_at", 3); //$NON-NLS-1$ - AtkTableCB_get_column_at_index = newCallback (AccessibleObject.class, "atkTable_get_column_at_index", 2); //$NON-NLS-1$ - AtkTableCB_get_row_at_index = newCallback (AccessibleObject.class, "atkTable_get_row_at_index", 2); //$NON-NLS-1$ - AtkTableCB_get_n_columns = newCallback (AccessibleObject.class, "atkTable_get_n_columns", 1); //$NON-NLS-1$ - AtkTableCB_get_n_rows = newCallback (AccessibleObject.class, "atkTable_get_n_rows", 1); //$NON-NLS-1$ - AtkTableCB_get_column_extent_at = newCallback (AccessibleObject.class, "atkTable_get_column_extent_at", 3); //$NON-NLS-1$ - AtkTableCB_get_row_extent_at = newCallback (AccessibleObject.class, "atkTable_get_row_extent_at", 3); //$NON-NLS-1$ - AtkTableCB_get_caption = newCallback (AccessibleObject.class, "atkTable_get_caption", 1); //$NON-NLS-1$ - AtkTableCB_get_summary = newCallback (AccessibleObject.class, "atkTable_get_summary", 1); //$NON-NLS-1$ - AtkTableCB_get_column_description = newCallback (AccessibleObject.class, "atkTable_get_column_description", 2); //$NON-NLS-1$ - AtkTableCB_get_row_description = newCallback (AccessibleObject.class, "atkTable_get_row_description", 2); //$NON-NLS-1$ - AtkTableCB_get_column_header = newCallback (AccessibleObject.class, "atkTable_get_column_header", 2); //$NON-NLS-1$ - AtkTableCB_get_row_header = newCallback (AccessibleObject.class, "atkTable_get_row_header", 2); //$NON-NLS-1$ - AtkTableCB_get_selected_columns = newCallback (AccessibleObject.class, "atkTable_get_selected_columns", 2); //$NON-NLS-1$ - AtkTableCB_get_selected_rows = newCallback (AccessibleObject.class, "atkTable_get_selected_rows", 2); //$NON-NLS-1$ - AtkTableCB_is_column_selected = newCallback (AccessibleObject.class, "atkTable_is_column_selected", 2); //$NON-NLS-1$ - AtkTableCB_is_row_selected = newCallback (AccessibleObject.class, "atkTable_is_row_selected", 2); //$NON-NLS-1$ - AtkTableCB_is_selected = newCallback (AccessibleObject.class, "atkTable_is_selected", 3); //$NON-NLS-1$ - AtkTableCB_add_column_selection = newCallback (AccessibleObject.class, "atkTable_add_column_selection", 2); //$NON-NLS-1$ - AtkTableCB_add_row_selection = newCallback (AccessibleObject.class, "atkTable_add_row_selection", 2); //$NON-NLS-1$ - AtkTableCB_remove_column_selection = newCallback (AccessibleObject.class, "atkTable_remove_column_selection", 2); //$NON-NLS-1$ - AtkTableCB_remove_row_selection = newCallback (AccessibleObject.class, "atkTable_remove_row_selection", 2); //$NON-NLS-1$ - AtkTextCB_get_character_extents = newCallback (AccessibleObject.class, "atkText_get_character_extents", 7); //$NON-NLS-1$ - AtkTextCB_get_range_extents = newCallback (AccessibleObject.class, "atkText_get_range_extents", 5); //$NON-NLS-1$ - AtkTextCB_get_run_attributes = newCallback (AccessibleObject.class, "atkText_get_run_attributes", 4); //$NON-NLS-1$ - AtkTextCB_get_offset_at_point = newCallback (AccessibleObject.class, "atkText_get_offset_at_point", 4); //$NON-NLS-1$ - AtkTextCB_add_selection = newCallback (AccessibleObject.class, "atkText_add_selection", 3); //$NON-NLS-1$ - AtkTextCB_remove_selection = newCallback (AccessibleObject.class, "atkText_remove_selection", 2); //$NON-NLS-1$ - AtkTextCB_set_selection = newCallback (AccessibleObject.class, "atkText_set_selection", 4); //$NON-NLS-1$ - AtkTextCB_get_caret_offset = newCallback (AccessibleObject.class, "atkText_get_caret_offset", 1); //$NON-NLS-1$ - AtkTextCB_set_caret_offset = newCallback (AccessibleObject.class, "atkText_set_caret_offset", 2); //$NON-NLS-1$ - AtkTextCB_get_n_selections = newCallback (AccessibleObject.class, "atkText_get_n_selections", 1); //$NON-NLS-1$ - AtkTextCB_get_selection = newCallback (AccessibleObject.class, "atkText_get_selection", 4); //$NON-NLS-1$ - AtkTextCB_get_text = newCallback (AccessibleObject.class, "atkText_get_text", 3); //$NON-NLS-1$ - AtkTextCB_get_text_after_offset = newCallback (AccessibleObject.class, "atkText_get_text_after_offset", 5); //$NON-NLS-1$ - AtkTextCB_get_text_at_offset = newCallback ( AccessibleObject.class, "atkText_get_text_at_offset", 5); //$NON-NLS-1$ - AtkTextCB_get_text_before_offset = newCallback (AccessibleObject.class, "atkText_get_text_before_offset", 5); //$NON-NLS-1$ - AtkTextCB_get_character_at_offset = newCallback (AccessibleObject.class, "atkText_get_character_at_offset", 2); //$NON-NLS-1$ - AtkTextCB_get_character_count = newCallback (AccessibleObject.class, "atkText_get_character_count", 1); //$NON-NLS-1$ - AtkTextCB_get_bounded_ranges = newCallback (AccessibleObject.class, "atkText_get_bounded_ranges", 5); //$NON-NLS-1$ - AtkValueCB_get_current_value = newCallback (AccessibleObject.class, "atkValue_get_current_value", 2); //$NON-NLS-1$ - AtkValueCB_get_maximum_value = newCallback (AccessibleObject.class, "atkValue_get_maximum_value", 2); //$NON-NLS-1$ - AtkValueCB_get_minimum_value = newCallback (AccessibleObject.class, "atkValue_get_minimum_value", 2); //$NON-NLS-1$ - AtkValueCB_set_current_value = newCallback (AccessibleObject.class, "atkValue_set_current_value", 2); //$NON-NLS-1$ - GObjectClass_finalize = newCallback (AccessibleObject.class, "gObjectClass_finalize", 1); //$NON-NLS-1$ - GTypeInfo_base_init_type = newCallback (AccessibleFactory.class, "gTypeInfo_base_init_type", 1); //$NON-NLS-1$ - GTypeInfo_base_init_factory = newCallback (AccessibleFactory.class, "gTypeInfo_base_init_factory", 1); //$NON-NLS-1$ - AtkObjectFactoryCB_create_accessible = newCallback (AccessibleFactory.class, "atkObjectFactory_create_accessible", 1); //$NON-NLS-1$ - /* Action interface */ - InitActionIfaceCB = newCallback (AccessibleFactory.class, "initActionIfaceCB", 1); //$NON-NLS-1$ - GInterfaceInfo interfaceInfo = new GInterfaceInfo (); - interfaceInfo.interface_init = InitActionIfaceCB.getAddress (); - ActionIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof); - OS.memmove (ActionIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof); - /* Component interface */ - InitComponentIfaceCB = newCallback (AccessibleFactory.class, "initComponentIfaceCB", 1); //$NON-NLS-1$ - interfaceInfo = new GInterfaceInfo (); - interfaceInfo.interface_init = InitComponentIfaceCB.getAddress (); - ComponentIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof); - OS.memmove (ComponentIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof); - /* EditableText interface */ - InitEditableTextIfaceCB = newCallback (AccessibleFactory.class, "initEditableTextIfaceCB", 1); //$NON-NLS-1$ - interfaceInfo = new GInterfaceInfo (); - interfaceInfo.interface_init = InitEditableTextIfaceCB.getAddress (); - EditableTextIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof); - OS.memmove (EditableTextIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof); - /* Hypertext interface */ - InitHypertextIfaceCB = newCallback (AccessibleFactory.class, "initHypertextIfaceCB", 1); //$NON-NLS-1$ - interfaceInfo = new GInterfaceInfo (); - interfaceInfo.interface_init = InitHypertextIfaceCB.getAddress (); - HypertextIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof); - OS.memmove (HypertextIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof); - /* Selection interface */ - InitSelectionIfaceCB = newCallback (AccessibleFactory.class, "initSelectionIfaceCB", 1); //$NON-NLS-1$ - interfaceInfo = new GInterfaceInfo (); - interfaceInfo.interface_init = InitSelectionIfaceCB.getAddress (); - SelectionIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof); - OS.memmove (SelectionIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof); - /* Text interface */ - InitTableIfaceCB = newCallback (AccessibleFactory.class, "initTableIfaceCB", 1); //$NON-NLS-1$ - interfaceInfo = new GInterfaceInfo (); - interfaceInfo.interface_init = InitTableIfaceCB.getAddress (); - TableIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof); - OS.memmove (TableIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof); - /* Text interface */ - InitTextIfaceCB = newCallback (AccessibleFactory.class, "initTextIfaceCB", 1); //$NON-NLS-1$ - interfaceInfo = new GInterfaceInfo (); - interfaceInfo.interface_init = InitTextIfaceCB.getAddress (); - TextIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof); - OS.memmove (TextIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof); - /* Value interface */ - InitValueIfaceCB = newCallback (AccessibleFactory.class, "initValueIfaceCB", 1); //$NON-NLS-1$ - interfaceInfo = new GInterfaceInfo (); - interfaceInfo.interface_init = InitValueIfaceCB.getAddress (); - ValueIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof); - OS.memmove (ValueIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof); - } - - static private Callback newCallback (Object object, String method, int argCount) { - Callback callback = new Callback (object, method, argCount); - if (callback.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS); - return callback; - } - - static String getTypeName (long /*int*/ type) { - long /*int*/ typeName = OS.g_type_name (type); - int widgetTypeNameLength = C.strlen (typeName); - byte[] buffer = new byte [widgetTypeNameLength]; - C.memmove (buffer, typeName, widgetTypeNameLength); - return new String(Converter.mbcsToWcs(buffer)); - } - - static long /*int*/ getParentType (long /*int*/ widgetType) { - LONG type = null; - while (widgetType != 0 && (type = Factories.get(new LONG(widgetType))) == null) { - widgetType = OS.g_type_parent (widgetType); - } - if (type == null) return 0; - return type.value; - } - - static long /*int*/ atkObjectFactory_create_accessible (long /*int*/ widget) { - 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 - */ - long /*int*/ result = OS.g_object_new (getParentType(OS.G_OBJECT_TYPE (widget)), 0); - ATK.atk_object_initialize (result, widget); - return result; - } - /* if an atk object has already been created for this widget then just return it */ - if (accessible.accessibleObject != null) { - return accessible.accessibleObject.atkHandle; - } - long /*int*/ widgetType = OS.G_OBJECT_TYPE (widget); - long /*int*/ parentType = getParentType (widgetType); - if (parentType == 0) parentType = GTK.GTK_TYPE_ACCESSIBLE(); - long /*int*/ type = getType (getTypeName(widgetType), accessible, parentType, ACC.CHILDID_SELF); - AccessibleObject object = new AccessibleObject (type, widget, accessible, false); - accessible.accessibleObject = object; - accessible.addRelations (); - return object.atkHandle; - } - - static AccessibleObject createChildAccessible (Accessible accessible, int childId) { - long /*int*/ childType = getType (CHILD_TYPENAME, accessible, GTK.GTK_TYPE_ACCESSIBLE(), childId); - return new AccessibleObject(childType, 0, accessible, true); - } - - static void createAccessible (Accessible accessible) { - long /*int*/ controlHandle = accessible.getControlHandle (); - GTK.gtk_widget_get_accessible(controlHandle); - } - - static long /*int*/ getType (String widgetTypeName, Accessible accessible, long /*int*/ parentType, int childId) { - AccessibleControlEvent event = new AccessibleControlEvent (accessible); - event.childID = childId; - List<AccessibleControlListener> listeners = accessible.accessibleControlListeners; - for (int i = 0, length = listeners == null ? 0 : listeners.size(); i < length; i++) { - AccessibleControlListener listener = listeners.get (i); - listener.getRole (event); - } - boolean action = false, editableText = false, hypertext = false, selection = false, table = false, text = false, value = false; - if (event.detail != 0) { /* a role was specified */ - for (int i = 0; i < actionRoles.length; i++) { - if (event.detail == actionRoles [i]) { - action = true; - break; - } - } - for (int i = 0; i < editableTextRoles.length; i++) { - if (event.detail == editableTextRoles [i]) { - editableText = true; - break; - } - } - for (int i = 0; i < hypertextRoles.length; i++) { - if (event.detail == hypertextRoles [i]) { - hypertext = true; - break; - } - } - for (int i = 0; i < selectionRoles.length; i++) { - if (event.detail == selectionRoles [i]) { - selection = true; - break; - } - } - for (int i = 0; i < tableRoles.length; i++) { - if (event.detail == tableRoles [i]) { - table = true; - break; - } - } - for (int i = 0; i < textRoles.length; i++) { - if (event.detail == textRoles [i]) { - text = true; - break; - } - } - for (int i = 0; i < valueRoles.length; i++) { - if (event.detail == valueRoles [i]) { - value = true; - break; - } - } - } else { - action = editableText = hypertext = selection = table = text = value = true; - } - String swtTypeName = SWT_TYPE_PREFIX + widgetTypeName; - if (action) swtTypeName += "Action"; //$NON-NLS-1$ - if (editableText) swtTypeName += "EditableText"; //$NON-NLS-1$ - if (hypertext) swtTypeName += "Hypertext"; //$NON-NLS-1$ - if (selection) swtTypeName += "Selection"; //$NON-NLS-1$ - if (table) swtTypeName += "Table"; //$NON-NLS-1$ - if (text) swtTypeName += "Text"; //$NON-NLS-1$ - if (value) swtTypeName += "Value"; //$NON-NLS-1$ - - byte[] nameBytes = Converter.wcsToMbcs(swtTypeName, true); - long /*int*/ type = OS.g_type_from_name(nameBytes); - if (type == 0) { - if (AccessibleObject.DEBUG) AccessibleObject.print("-->New Type=" + swtTypeName); //$NON-NLS-1$ - /* define the type */ - long /*int*/ queryPtr = OS.g_malloc (GTypeQuery.sizeof); - OS.g_type_query (parentType, queryPtr); - GTypeQuery query = new GTypeQuery (); - OS.memmove (query, queryPtr, GTypeQuery.sizeof); - OS.g_free (queryPtr); - GTypeInfo typeInfo = new GTypeInfo (); - typeInfo.base_init = GTypeInfo_base_init_type.getAddress (); - typeInfo.class_size = (short) query.class_size; - typeInfo.instance_size = (short) query.instance_size; - long /*int*/ definition = OS.g_malloc (GTypeInfo.sizeof); - OS.memmove (definition, typeInfo, GTypeInfo.sizeof); - type = OS.g_type_register_static (parentType, nameBytes, definition, 0); - OS.g_type_add_interface_static (type, ATK.ATK_TYPE_COMPONENT(), ComponentIfaceDefinition); - if (action) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_ACTION(), ActionIfaceDefinition); - if (editableText) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_EDITABLE_TEXT(), EditableTextIfaceDefinition); - if (hypertext) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_HYPERTEXT(), HypertextIfaceDefinition); - if (selection) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_SELECTION(), SelectionIfaceDefinition); - if (table) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_TABLE(), TableIfaceDefinition); - if (text) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_TEXT(), TextIfaceDefinition); - if (value) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_VALUE(), ValueIfaceDefinition); - } - return type; - } - - static long /*int*/ gTypeInfo_base_init_factory (long /*int*/ klass) { - AtkObjectFactoryClass objectClass = new AtkObjectFactoryClass (); - ATK.memmove (objectClass, klass); - objectClass.create_accessible = AtkObjectFactoryCB_create_accessible.getAddress (); - ATK.memmove (klass, objectClass); - return 0; - } - - static long /*int*/ gTypeInfo_base_init_type (long /*int*/ klass) { - AtkObjectClass objectClass = new AtkObjectClass (); - ATK.memmove (objectClass, klass); - objectClass.get_name = AtkObjectCB_get_name.getAddress (); - objectClass.get_description = AtkObjectCB_get_description.getAddress (); - objectClass.get_n_children = AtkObjectCB_get_n_children.getAddress (); - objectClass.get_role = AtkObjectCB_get_role.getAddress (); - objectClass.get_parent = AtkObjectCB_get_parent.getAddress (); - 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 (); - objectClass.get_attributes = AtkObjectCB_get_attributes.getAddress (); - long /*int*/ gObjectClass = OS.G_OBJECT_CLASS (klass); - GObjectClass objectClassStruct = new GObjectClass (); - OS.memmove (objectClassStruct, gObjectClass); - objectClassStruct.finalize = GObjectClass_finalize.getAddress (); - OS.memmove (gObjectClass, objectClassStruct); - ATK.memmove (klass, objectClass); - return 0; - } - - static long /*int*/ initActionIfaceCB (long /*int*/ iface) { - AtkActionIface inter = new AtkActionIface (); - ATK.memmove (inter, iface); - inter.do_action = AtkActionCB_do_action.getAddress (); - inter.get_n_actions = AtkActionCB_get_n_actions.getAddress (); - inter.get_description = AtkActionCB_get_description.getAddress (); - inter.get_keybinding = AtkActionCB_get_keybinding.getAddress (); - inter.get_name = AtkActionCB_get_name.getAddress (); - ATK.memmove (iface, inter); - return 0; - } - - static long /*int*/ initComponentIfaceCB (long /*int*/ iface) { - AtkComponentIface inter = new AtkComponentIface (); - ATK.memmove (inter, iface); - inter.get_extents = AtkComponentCB_get_extents.getAddress (); - inter.get_position = AtkComponentCB_get_position.getAddress (); - inter.get_size = AtkComponentCB_get_size.getAddress (); - inter.ref_accessible_at_point = AtkComponentCB_ref_accessible_at_point.getAddress (); - ATK.memmove (iface, inter); - return 0; - } - - static long /*int*/ initEditableTextIfaceCB (long /*int*/ iface) { - AtkEditableTextIface inter = new AtkEditableTextIface (); - ATK.memmove (inter, iface); - inter.set_run_attributes = AtkEditableTextCB_set_run_attributes.getAddress (); - inter.set_text_contents = AtkEditableTextCB_set_text_contents.getAddress (); - inter.insert_text = AtkEditableTextCB_insert_text.getAddress (); - inter.copy_text = AtkEditableTextCB_copy_text.getAddress (); - inter.cut_text = AtkEditableTextCB_cut_text.getAddress (); - inter.delete_text = AtkEditableTextCB_delete_text.getAddress (); - inter.paste_text = AtkEditableTextCB_paste_text.getAddress (); - ATK.memmove (iface, inter); - return 0; - } - - static long /*int*/ initHypertextIfaceCB (long /*int*/ iface) { - AtkHypertextIface inter = new AtkHypertextIface (); - ATK.memmove (inter, iface); - inter.get_link = AtkHypertextCB_get_link.getAddress (); - inter.get_link_index = AtkHypertextCB_get_link_index.getAddress (); - inter.get_n_links = AtkHypertextCB_get_n_links.getAddress (); - ATK.memmove (iface, inter); - return 0; - } - - static long /*int*/ initSelectionIfaceCB (long /*int*/ iface) { - AtkSelectionIface inter = new AtkSelectionIface (); - ATK.memmove (inter, iface); - inter.is_child_selected = AtkSelectionCB_is_child_selected.getAddress (); - inter.ref_selection = AtkSelectionCB_ref_selection.getAddress (); - ATK.memmove (iface, inter); - return 0; - } - - static long /*int*/ initTableIfaceCB (long /*int*/ iface) { - AtkTableIface inter = new AtkTableIface (); - ATK.memmove (inter, iface); - inter.ref_at = AtkTableCB_ref_at.getAddress(); - inter.get_index_at = AtkTableCB_get_index_at.getAddress(); - inter.get_column_at_index = AtkTableCB_get_column_at_index.getAddress(); - inter.get_row_at_index = AtkTableCB_get_row_at_index.getAddress(); - inter.get_n_columns = AtkTableCB_get_n_columns.getAddress(); - inter.get_n_rows = AtkTableCB_get_n_rows.getAddress(); - inter.get_column_extent_at = AtkTableCB_get_column_extent_at.getAddress(); - inter.get_row_extent_at = AtkTableCB_get_row_extent_at.getAddress(); - inter.get_caption = AtkTableCB_get_caption.getAddress(); - inter.get_summary = AtkTableCB_get_summary.getAddress(); - inter.get_column_description = AtkTableCB_get_column_description.getAddress(); - inter.get_row_description = AtkTableCB_get_row_description.getAddress(); - inter.get_column_header = AtkTableCB_get_column_header.getAddress(); - inter.get_row_header = AtkTableCB_get_row_header.getAddress(); - inter.get_selected_columns = AtkTableCB_get_selected_columns.getAddress(); - inter.get_selected_rows = AtkTableCB_get_selected_rows.getAddress(); - inter.is_column_selected = AtkTableCB_is_column_selected.getAddress(); - inter.is_row_selected = AtkTableCB_is_row_selected.getAddress(); - inter.is_selected = AtkTableCB_is_selected.getAddress(); - inter.add_column_selection = AtkTableCB_add_column_selection.getAddress(); - inter.add_row_selection = AtkTableCB_add_row_selection.getAddress(); - inter.remove_column_selection = AtkTableCB_remove_column_selection.getAddress(); - inter.remove_row_selection = AtkTableCB_remove_row_selection.getAddress(); - ATK.memmove (iface, inter); - return 0; - } - - static long /*int*/ initTextIfaceCB (long /*int*/ iface) { - AtkTextIface inter = new AtkTextIface (); - ATK.memmove (inter, iface); - inter.get_range_extents = AtkTextCB_get_range_extents.getAddress (); - inter.get_character_extents = AtkTextCB_get_character_extents.getAddress (); - inter.get_run_attributes= AtkTextCB_get_run_attributes.getAddress (); - inter.get_offset_at_point = AtkTextCB_get_offset_at_point.getAddress (); - inter.add_selection = AtkTextCB_add_selection.getAddress (); - inter.remove_selection = AtkTextCB_remove_selection.getAddress (); - inter.set_selection = AtkTextCB_set_selection.getAddress (); - inter.get_caret_offset = AtkTextCB_get_caret_offset.getAddress (); - inter.set_caret_offset = AtkTextCB_set_caret_offset.getAddress (); - inter.get_character_at_offset = AtkTextCB_get_character_at_offset.getAddress (); - inter.get_character_count = AtkTextCB_get_character_count.getAddress (); - inter.get_n_selections = AtkTextCB_get_n_selections.getAddress (); - inter.get_selection = AtkTextCB_get_selection.getAddress (); - inter.get_text = AtkTextCB_get_text.getAddress (); - inter.get_text_after_offset = AtkTextCB_get_text_after_offset.getAddress (); - inter.get_text_at_offset = AtkTextCB_get_text_at_offset.getAddress (); - inter.get_text_before_offset = AtkTextCB_get_text_before_offset.getAddress (); - inter.get_bounded_ranges = AtkTextCB_get_bounded_ranges.getAddress (); - ATK.memmove (iface, inter); - return 0; - } - - static long /*int*/ initValueIfaceCB (long /*int*/ iface) { - AtkValueIface inter = new AtkValueIface (); - ATK.memmove (inter, iface); - inter.get_current_value = AtkValueCB_get_current_value.getAddress (); - inter.get_maximum_value = AtkValueCB_get_maximum_value.getAddress (); - inter.get_minimum_value = AtkValueCB_get_minimum_value.getAddress (); - inter.set_current_value = AtkValueCB_set_current_value.getAddress (); - ATK.memmove (iface, inter); - return 0; - } - - static void registerAccessible (Accessible accessible) { - long /*int*/ widget = accessible.getControlHandle (); - long /*int*/ widgetType = OS.G_OBJECT_TYPE (widget); - long /*int*/ registry = ATK.atk_get_default_registry (); - long /*int*/ factory = ATK.atk_registry_get_factory (registry, widgetType); - /* If NO_OP factory is registered then OS accessibility is not active */ - if (ATK.ATK_IS_NO_OP_OBJECT_FACTORY(factory)) return; - String name = FACTORY_TYPENAME + getTypeName(widgetType); - byte[] factoryName = Converter.wcsToMbcs(name, true); - if (OS.g_type_from_name (factoryName) == 0) { - if (AccessibleObject.DEBUG) AccessibleObject.print("-->New Factory=" + name); //$NON-NLS-1$ - /* register the factory */ - GTypeInfo typeInfo = new GTypeInfo (); - typeInfo.base_init = GTypeInfo_base_init_factory.getAddress (); - typeInfo.class_size = (short)ATK.AtkObjectFactoryClass_sizeof (); - typeInfo.instance_size = (short)ATK.AtkObjectFactory_sizeof (); - long /*int*/ info = OS.g_malloc (GTypeInfo.sizeof); - OS.memmove (info, typeInfo, GTypeInfo.sizeof); - long /*int*/ swtFactoryType = OS.g_type_register_static (ATK.ATK_TYPE_OBJECT_FACTORY(), factoryName, info, 0); - long /*int*/ parentType = ATK.atk_object_factory_get_accessible_type(factory); - ATK.atk_registry_set_factory_type (registry, widgetType, swtFactoryType); - Factories.put (new LONG (widgetType), new LONG (parentType)); - } - if (AccessibleObject.DEBUG) AccessibleObject.print("-->Register=" + accessible.control + " " + widget); //$NON-NLS-1$ - Accessibles.put (new LONG (widget), accessible); - } - - static void unregisterAccessible (Accessible accessible) { - long /*int*/ widget = accessible.getControlHandle (); - Accessibles.remove (new LONG (widget)); - if (AccessibleObject.DEBUG) AccessibleObject.print("-->Deregister=" + accessible.control + " " + widget); //$NON-NLS-1$ - } -} 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 9724e0b3c6..2fc7b2e951 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 @@ -42,38 +42,21 @@ class AccessibleObject { static final Map<LONG, AccessibleObject> AccessibleObjects = new HashMap<> (9); static final boolean DEBUG = Device.DEBUG; - static final int ROW_ROLE; - static { - - // Gtk3.2 has a minimum requirement of ATK 2.1.5 - // ATK_ROLE_TABLE_ROW was introduced in ATK 2.1.0. See Bug 470629 for details. - if (GTK.GTK_VERSION >= OS.VERSION(3, 2, 0)) { - ROW_ROLE = ATK.ATK_ROLE_TABLE_ROW; - } else { - ROW_ROLE = ATK.atk_role_register(Converter.wcsToMbcs("row", true)); //$NON-NLS-1$ - } - } - AccessibleObject (long /*int*/ type, long /*int*/ widget, Accessible accessible, boolean isLightweight) { super (); - if (GTK.GTK3) { - if (type == OS.swt_fixed_get_type()) { - if (widget != 0 && !isLightweight) { - atkHandle = GTK.gtk_widget_get_accessible(widget); - } else { - // Lightweight widgets map to no "real" GTK widget, so we - // just instantiate a new SwtFixedAccessible - atkHandle = OS.g_object_new (OS.swt_fixed_accessible_get_type(), 0); - } - OS.swt_fixed_accessible_register_accessible(atkHandle, false, widget); - } else { - // TODO_a11y: accessibility listeners on the Java side have not yet - // been implemented for native GTK widgets on GTK3. + if (type == OS.swt_fixed_get_type()) { + if (widget != 0 && !isLightweight) { atkHandle = GTK.gtk_widget_get_accessible(widget); + } else { + // Lightweight widgets map to no "real" GTK widget, so we + // just instantiate a new SwtFixedAccessible + atkHandle = OS.g_object_new (OS.swt_fixed_accessible_get_type(), 0); } + OS.swt_fixed_accessible_register_accessible(atkHandle, false, widget); } else { - atkHandle = OS.g_object_new (type, 0); - ATK.atk_object_initialize (atkHandle, widget); + // TODO_a11y: accessibility listeners on the Java side have not yet + // been implemented for native GTK widgets on GTK3. + atkHandle = GTK.gtk_widget_get_accessible(widget); } this.accessible = accessible; this.isLightweight = isLightweight; @@ -99,7 +82,7 @@ class AccessibleObject { * parent */ static AtkActionIface getParentActionIface (long /*int*/ atkObject) { - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type(); if (OS.g_type_is_a (OS.g_type_parent (type), ATK.ATK_TYPE_ACTION())) { AtkActionIface iface = new AtkActionIface (); ATK.memmove (iface, OS.g_type_interface_peek_parent (ATK.ATK_ACTION_GET_IFACE (atkObject))); @@ -346,7 +329,7 @@ class AccessibleObject { * parent */ static AtkComponentIface getParentComponentIface (long /*int*/ atkObject) { - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type(); if (OS.g_type_is_a (OS.g_type_parent (type), ATK.ATK_TYPE_COMPONENT())) { AtkComponentIface iface = new AtkComponentIface (); ATK.memmove (iface, OS.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (atkObject))); @@ -505,11 +488,7 @@ class AccessibleObject { AtkComponentIface iface = getParentComponentIface (atkObject); if (iface != null && iface.get_size != 0) { // ATK with GTK3 doesn't have the coord_type parameter - if (!GTK.GTK3) { - OS.call (iface.get_size, atkObject, width, height, coord_type); - } else { - ATK.call (iface.get_size, atkObject, width, height); - } + ATK.call (iface.get_size, atkObject, width, height); } if (object != null) { Accessible accessible = object.accessible; @@ -599,7 +578,7 @@ class AccessibleObject { * parent */ static AtkEditableTextIface getParentEditableTextIface (long /*int*/ atkObject) { - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type(); if (OS.g_type_is_a (OS.g_type_parent (type), ATK.ATK_TYPE_EDITABLE_TEXT())) { AtkEditableTextIface iface = new AtkEditableTextIface (); ATK.memmove (iface, OS.g_type_interface_peek_parent (ATK.ATK_EDITABLE_TEXT_GET_IFACE (atkObject))); @@ -1039,7 +1018,7 @@ class AccessibleObject { * parent */ static AtkHypertextIface getParentHypertextIface (long /*int*/ atkObject) { - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type(); if (OS.g_type_is_a (OS.g_type_parent (type), ATK.ATK_TYPE_HYPERTEXT())) { AtkHypertextIface iface = new AtkHypertextIface (); ATK.memmove (iface, OS.g_type_interface_peek_parent (ATK.ATK_HYPERTEXT_GET_IFACE (atkObject))); @@ -1172,9 +1151,9 @@ class AccessibleObject { * @return an AtkObjectClass object representing the class struct of atkObject's * parent */ - static AtkObjectClass getParentAtkObjectClass (long /*int*/ atkObject) { + static AtkObjectClass getParentAtkObjectClass () { AtkObjectClass objectClass = new AtkObjectClass (); - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type(); if (type != 0) { long /*int*/ parentType = OS.g_type_parent (type); if (parentType != 0) ATK.memmove (objectClass, OS.g_type_class_peek (parentType)); @@ -1198,7 +1177,7 @@ class AccessibleObject { static long /*int*/ atkObject_get_description (long /*int*/ atkObject) { AccessibleObject object = getAccessibleObject (atkObject); long /*int*/ parentResult = 0; - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.get_description != 0) { parentResult = ATK.call (objectClass.get_description, atkObject); } @@ -1239,7 +1218,7 @@ class AccessibleObject { static long /*int*/ atkObject_get_attributes (long /*int*/ atkObject) { AccessibleObject object = getAccessibleObject (atkObject); long /*int*/ parentResult = 0; - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.get_attributes != 0) { parentResult = ATK.call (objectClass.get_attributes, atkObject); } @@ -1385,7 +1364,7 @@ class AccessibleObject { static long /*int*/ atkObject_get_name (long /*int*/ atkObject) { AccessibleObject object = getAccessibleObject (atkObject); long /*int*/ parentResult = 0; - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.get_name != 0) { parentResult = ATK.call (objectClass.get_name, atkObject); } @@ -1426,7 +1405,7 @@ class AccessibleObject { static long /*int*/ atkObject_get_n_children (long /*int*/ atkObject) { AccessibleObject object = getAccessibleObject (atkObject); long /*int*/ parentResult = 0; - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.get_n_children != 0) { parentResult = ATK.call (objectClass.get_n_children, atkObject); } @@ -1481,7 +1460,7 @@ class AccessibleObject { return object.index; } } - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.get_index_in_parent == 0) return 0; long /*int*/ result = ATK.call (objectClass.get_index_in_parent, atkObject); return result; @@ -1508,7 +1487,7 @@ class AccessibleObject { return object.parent.atkHandle; } } - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.get_parent == 0) return 0; long /*int*/ parentResult = ATK.call (objectClass.get_parent, atkObject); return parentResult; @@ -1573,7 +1552,7 @@ class AccessibleObject { case ACC.ROLE_RADIOBUTTON: return ATK.ATK_ROLE_RADIO_BUTTON; case ACC.ROLE_SPLITBUTTON: return ATK.ATK_ROLE_PUSH_BUTTON; case ACC.ROLE_WINDOW: return ATK.ATK_ROLE_WINDOW; - case ACC.ROLE_ROW: return ROW_ROLE; + case ACC.ROLE_ROW: return ATK.ATK_ROLE_TABLE_ROW; case ACC.ROLE_COLUMN: return ATK.ATK_ROLE_UNKNOWN; //Column role doesn't exist on Gtk. case ACC.ROLE_ALERT: return ATK.ATK_ROLE_ALERT; case ACC.ROLE_ANIMATION: return ATK.ATK_ROLE_ANIMATION; @@ -1599,7 +1578,7 @@ class AccessibleObject { } } } - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.get_role == 0) return 0; return ATK.call (objectClass.get_role, atkObject); } @@ -1644,7 +1623,7 @@ class AccessibleObject { return OS.g_object_ref (accObject.atkHandle); } } - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.ref_child == 0) return 0; return ATK.call (objectClass.ref_child, atkObject, index); } @@ -1665,7 +1644,7 @@ class AccessibleObject { static long /*int*/ atkObject_ref_state_set (long /*int*/ atkObject) { AccessibleObject object = getAccessibleObject (atkObject); long /*int*/ parentResult = 0; - AtkObjectClass objectClass = getParentAtkObjectClass (atkObject); + AtkObjectClass objectClass = getParentAtkObjectClass (); if (objectClass.ref_state_set != 0) { parentResult = ATK.call (objectClass.ref_state_set, atkObject); } @@ -1725,7 +1704,7 @@ class AccessibleObject { * parent */ static AtkSelectionIface getParentSelectionIface (long /*int*/ atkObject) { - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type() ; if (OS.g_type_is_a (OS.g_type_parent (type), ATK.ATK_TYPE_SELECTION())) { AtkSelectionIface iface = new AtkSelectionIface (); ATK.memmove (iface, OS.g_type_interface_peek_parent (ATK.ATK_SELECTION_GET_IFACE (atkObject))); @@ -1830,7 +1809,7 @@ class AccessibleObject { * parent */ static AtkTableIface getParentTableIface (long /*int*/ atkObject) { - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type(); if (OS.g_type_is_a (OS.g_type_parent (type), ATK.ATK_TYPE_TABLE())) { AtkTableIface iface = new AtkTableIface (); ATK.memmove (iface, OS.g_type_interface_peek_parent (ATK.ATK_TABLE_GET_IFACE (atkObject))); @@ -2801,7 +2780,7 @@ class AccessibleObject { * parent */ static AtkTextIface getParentTextIface (long /*int*/ atkObject) { - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type(); if (OS.g_type_is_a (OS.g_type_parent (type), ATK.ATK_TYPE_TEXT())) { AtkTextIface iface = new AtkTextIface (); ATK.memmove (iface, OS.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (atkObject))); @@ -4388,7 +4367,7 @@ class AccessibleObject { * parent */ static AtkValueIface getParentValueIface (long /*int*/ atkObject) { - long /*int*/ type = GTK.GTK3 ? OS.swt_fixed_accessible_get_type() : OS.G_OBJECT_TYPE (atkObject); + long /*int*/ type = OS.swt_fixed_accessible_get_type(); if (OS.g_type_is_a (OS.g_type_parent (type), ATK.ATK_TYPE_VALUE())) { AtkValueIface iface = new AtkValueIface (); ATK.memmove (iface, OS.g_type_interface_peek_parent (ATK.ATK_VALUE_GET_IFACE (atkObject))); @@ -4609,16 +4588,8 @@ class AccessibleObject { static long /*int*/ gObjectClass_finalize (long /*int*/ atkObject) { /* * GObject destruction is handled in os_custom.c in GTK3. - * Both GTK3 and GTK2 need to remove the AccessibleObject from - * the map of AccessibleObjects, though. + * AccessibleObject has to be removed from the map of AccessibleObjects, though. */ - if (!GTK.GTK3) { - long /*int*/ superType = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (atkObject)); - long /*int*/ gObjectClass = OS.G_OBJECT_CLASS (superType); - GObjectClass objectClassStruct = new GObjectClass (); - OS.memmove (objectClassStruct, gObjectClass); - ATK.call (objectClassStruct.finalize, atkObject); - } AccessibleObject object = AccessibleObjects.get (new LONG (atkObject)); if (object != null) { AccessibleObjects.remove (new LONG (atkObject)); @@ -4865,10 +4836,8 @@ class AccessibleObject { OS.g_object_notify(atkHandle, ATK.accessible_hypertext_nlinks); break; case ACC.EVENT_ATTRIBUTE_CHANGED: - if (GTK.GTK3) { - long /*int*/ gType = OS.G_OBJECT_TYPE(atkHandle); - if (gType == GTK.GTK_TYPE_TEXT_VIEW_ACCESSIBLE()) break; - } + long /*int*/ gType = OS.G_OBJECT_TYPE(atkHandle); + if (gType == GTK.GTK_TYPE_TEXT_VIEW_ACCESSIBLE()) break; OS.g_signal_emit_by_name (atkHandle, ATK.attributes_changed); break; case ACC.EVENT_TABLE_CAPTION_CHANGED: @@ -5021,13 +4990,9 @@ class AccessibleObject { object = event.accessible.getAccessibleObject(); if (object != null) OS.g_object_ref(object.atkHandle); } else { - if (GTK.GTK3) { - long /*int*/ type = OS.G_OBJECT_TYPE (accessible.getControlHandle()); - long /*int*/ widget = accessible.getControlHandle(); - object = new AccessibleObject(type, widget, accessible, true); - } else { - object = AccessibleFactory.createChildAccessible (accessible, id); - } + long /*int*/ type = OS.G_OBJECT_TYPE (accessible.getControlHandle()); + long /*int*/ widget = accessible.getControlHandle(); + object = new AccessibleObject(type, widget, accessible, true); } object.id = id; } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c index 4554092653..9385081133 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c @@ -24,18 +24,6 @@ #define ATK_NATIVE(func) Java_org_eclipse_swt_internal_accessibility_gtk_ATK_##func #endif -#ifndef NO_ATK_1IS_1NO_1OP_1OBJECT_1FACTORY -JNIEXPORT jboolean JNICALL ATK_NATIVE(ATK_1IS_1NO_1OP_1OBJECT_1FACTORY) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - ATK_NATIVE_ENTER(env, that, ATK_1IS_1NO_1OP_1OBJECT_1FACTORY_FUNC); - rc = (jboolean)ATK_IS_NO_OP_OBJECT_FACTORY(arg0); - ATK_NATIVE_EXIT(env, that, ATK_1IS_1NO_1OP_1OBJECT_1FACTORY_FUNC); - return rc; -} -#endif - #ifndef NO_ATK_1TYPE_1ACTION JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1ACTION) (JNIEnv *env, jclass that) @@ -156,30 +144,6 @@ JNIEXPORT jint JNICALL ATK_NATIVE(AtkAttribute_1sizeof) } #endif -#ifndef NO_AtkObjectFactoryClass_1sizeof -JNIEXPORT jint JNICALL ATK_NATIVE(AtkObjectFactoryClass_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - ATK_NATIVE_ENTER(env, that, AtkObjectFactoryClass_1sizeof_FUNC); - rc = (jint)AtkObjectFactoryClass_sizeof(); - ATK_NATIVE_EXIT(env, that, AtkObjectFactoryClass_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_AtkObjectFactory_1sizeof -JNIEXPORT jint JNICALL ATK_NATIVE(AtkObjectFactory_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - ATK_NATIVE_ENTER(env, that, AtkObjectFactory_1sizeof_FUNC); - rc = (jint)AtkObjectFactory_sizeof(); - ATK_NATIVE_EXIT(env, that, AtkObjectFactory_1sizeof_FUNC); - return rc; -} -#endif - #ifndef NO_AtkTextRange_1sizeof JNIEXPORT jint JNICALL ATK_NATIVE(AtkTextRange_1sizeof) (JNIEnv *env, jclass that) @@ -312,18 +276,6 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1VALUE_1GET_1IFACE) } #endif -#ifndef NO__1atk_1get_1default_1registry -JNIEXPORT jintLong JNICALL ATK_NATIVE(_1atk_1get_1default_1registry) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - ATK_NATIVE_ENTER(env, that, _1atk_1get_1default_1registry_FUNC); - rc = (jintLong)atk_get_default_registry(); - ATK_NATIVE_EXIT(env, that, _1atk_1get_1default_1registry_FUNC); - return rc; -} -#endif - #ifndef NO__1atk_1object_1add_1relationship JNIEXPORT jboolean JNICALL ATK_NATIVE(_1atk_1object_1add_1relationship) (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2) @@ -336,28 +288,6 @@ JNIEXPORT jboolean JNICALL ATK_NATIVE(_1atk_1object_1add_1relationship) } #endif -#ifndef NO__1atk_1object_1factory_1get_1accessible_1type -JNIEXPORT jintLong JNICALL ATK_NATIVE(_1atk_1object_1factory_1get_1accessible_1type) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - ATK_NATIVE_ENTER(env, that, _1atk_1object_1factory_1get_1accessible_1type_FUNC); - rc = (jintLong)atk_object_factory_get_accessible_type((AtkObjectFactory *)arg0); - ATK_NATIVE_EXIT(env, that, _1atk_1object_1factory_1get_1accessible_1type_FUNC); - return rc; -} -#endif - -#ifndef NO__1atk_1object_1initialize -JNIEXPORT void JNICALL ATK_NATIVE(_1atk_1object_1initialize) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - ATK_NATIVE_ENTER(env, that, _1atk_1object_1initialize_FUNC); - atk_object_initialize((AtkObject *)arg0, (gpointer)arg1); - ATK_NATIVE_EXIT(env, that, _1atk_1object_1initialize_FUNC); -} -#endif - #ifndef NO__1atk_1object_1notify_1state_1change JNIEXPORT void JNICALL ATK_NATIVE(_1atk_1object_1notify_1state_1change) (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jboolean arg2) @@ -380,52 +310,6 @@ JNIEXPORT jboolean JNICALL ATK_NATIVE(_1atk_1object_1remove_1relationship) } #endif -#ifndef NO__1atk_1registry_1get_1factory -JNIEXPORT jintLong JNICALL ATK_NATIVE(_1atk_1registry_1get_1factory) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - jintLong rc = 0; - ATK_NATIVE_ENTER(env, that, _1atk_1registry_1get_1factory_FUNC); - rc = (jintLong)atk_registry_get_factory((AtkRegistry *)arg0, (GType)arg1); - ATK_NATIVE_EXIT(env, that, _1atk_1registry_1get_1factory_FUNC); - return rc; -} -#endif - -#ifndef NO__1atk_1registry_1set_1factory_1type -JNIEXPORT void JNICALL ATK_NATIVE(_1atk_1registry_1set_1factory_1type) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2) -{ - ATK_NATIVE_ENTER(env, that, _1atk_1registry_1set_1factory_1type_FUNC); - atk_registry_set_factory_type((AtkRegistry *)arg0, (GType)arg1, (GType)arg2); - ATK_NATIVE_EXIT(env, that, _1atk_1registry_1set_1factory_1type_FUNC); -} -#endif - -#ifndef NO__1atk_1role_1register -JNIEXPORT jint JNICALL ATK_NATIVE(_1atk_1role_1register) - (JNIEnv *env, jclass that, jbyteArray arg0) -{ - jbyte *lparg0=NULL; - jint rc = 0; - ATK_NATIVE_ENTER(env, that, _1atk_1role_1register_FUNC); - if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; -/* - rc = (jint)atk_role_register((const gchar *)lparg0); -*/ - { - ATK_LOAD_FUNCTION(fp, atk_role_register) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0); - } - } -fail: - if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); - ATK_NATIVE_EXIT(env, that, _1atk_1role_1register_FUNC); - return rc; -} -#endif - #ifndef NO__1atk_1state_1set_1add_1state JNIEXPORT jboolean JNICALL ATK_NATIVE(_1atk_1state_1set_1add_1state) (JNIEnv *env, jclass that, jintLong arg0, jint arg1) @@ -683,27 +567,6 @@ JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibil } #endif -#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2) && defined(JNI64)) -#ifndef JNI64 -JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -#else -JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -#endif -{ -#ifndef JNI64 - ATK_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2_FUNC); -#else - ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2_FUNC); -#endif - if (arg1) getAtkObjectFactoryClassFields(env, arg1, (AtkObjectFactoryClass *)arg0); -#ifndef JNI64 - ATK_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2_FUNC); -#else - ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2_FUNC); -#endif -} -#endif - #if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2) && defined(JNI64)) #ifndef JNI64 JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1) @@ -966,27 +829,6 @@ JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibili } #endif -#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2J) && defined(JNI64)) -#ifndef JNI64 -JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1) -#else -JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1) -#endif -{ -#ifndef JNI64 - ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I_FUNC); -#else - ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2J_FUNC); -#endif - if (arg0) setAtkObjectFactoryClassFields(env, arg0, (AtkObjectFactoryClass *)arg1); -#ifndef JNI64 - ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I_FUNC); -#else - ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2J_FUNC); -#endif -} -#endif - #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2J) && defined(JNI64)) #ifndef JNI64 JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c index d89b31e658..61f2fa373f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c @@ -22,7 +22,6 @@ #ifdef NATIVE_STATS char * ATK_nativeFunctionNames[] = { - "ATK_1IS_1NO_1OP_1OBJECT_1FACTORY", "ATK_1TYPE_1ACTION", "ATK_1TYPE_1COMPONENT", "ATK_1TYPE_1EDITABLE_1TEXT", @@ -33,8 +32,6 @@ char * ATK_nativeFunctionNames[] = { "ATK_1TYPE_1TEXT", "ATK_1TYPE_1VALUE", "AtkAttribute_1sizeof", - "AtkObjectFactoryClass_1sizeof", - "AtkObjectFactory_1sizeof", "AtkTextRange_1sizeof", "AtkTextRectangle_1sizeof", "_1ATK_1ACTION_1GET_1IFACE", @@ -46,15 +43,9 @@ char * ATK_nativeFunctionNames[] = { "_1ATK_1TABLE_1GET_1IFACE", "_1ATK_1TEXT_1GET_1IFACE", "_1ATK_1VALUE_1GET_1IFACE", - "_1atk_1get_1default_1registry", "_1atk_1object_1add_1relationship", - "_1atk_1object_1factory_1get_1accessible_1type", - "_1atk_1object_1initialize", "_1atk_1object_1notify_1state_1change", "_1atk_1object_1remove_1relationship", - "_1atk_1registry_1get_1factory", - "_1atk_1registry_1set_1factory_1type", - "_1atk_1role_1register", "_1atk_1state_1set_1add_1state", "_1atk_1text_1attribute_1get_1name", "_1atk_1text_1attribute_1get_1value", @@ -109,11 +100,6 @@ char * ATK_nativeFunctionNames[] = { "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2", #endif #ifndef JNI64 - "memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2", -#else - "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2", -#endif -#ifndef JNI64 "memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2", #else "memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2", @@ -174,11 +160,6 @@ char * ATK_nativeFunctionNames[] = { "memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2J", #endif #ifndef JNI64 - "memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I", -#else - "memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2J", -#endif -#ifndef JNI64 "memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2I", #else "memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2J", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h index 3ff0517333..cd9187eb4e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h @@ -32,7 +32,6 @@ extern char* ATK_nativeFunctionNames[]; #endif typedef enum { - ATK_1IS_1NO_1OP_1OBJECT_1FACTORY_FUNC, ATK_1TYPE_1ACTION_FUNC, ATK_1TYPE_1COMPONENT_FUNC, ATK_1TYPE_1EDITABLE_1TEXT_FUNC, @@ -43,8 +42,6 @@ typedef enum { ATK_1TYPE_1TEXT_FUNC, ATK_1TYPE_1VALUE_FUNC, AtkAttribute_1sizeof_FUNC, - AtkObjectFactoryClass_1sizeof_FUNC, - AtkObjectFactory_1sizeof_FUNC, AtkTextRange_1sizeof_FUNC, AtkTextRectangle_1sizeof_FUNC, _1ATK_1ACTION_1GET_1IFACE_FUNC, @@ -56,15 +53,9 @@ typedef enum { _1ATK_1TABLE_1GET_1IFACE_FUNC, _1ATK_1TEXT_1GET_1IFACE_FUNC, _1ATK_1VALUE_1GET_1IFACE_FUNC, - _1atk_1get_1default_1registry_FUNC, _1atk_1object_1add_1relationship_FUNC, - _1atk_1object_1factory_1get_1accessible_1type_FUNC, - _1atk_1object_1initialize_FUNC, _1atk_1object_1notify_1state_1change_FUNC, _1atk_1object_1remove_1relationship_FUNC, - _1atk_1registry_1get_1factory_FUNC, - _1atk_1registry_1set_1factory_1type_FUNC, - _1atk_1role_1register_FUNC, _1atk_1state_1set_1add_1state_FUNC, _1atk_1text_1attribute_1get_1name_FUNC, _1atk_1text_1attribute_1get_1value_FUNC, @@ -119,11 +110,6 @@ typedef enum { memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2_FUNC, #endif #ifndef JNI64 - memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2_FUNC, -#else - memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2_FUNC, -#endif -#ifndef JNI64 memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2_FUNC, #else memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2_FUNC, @@ -184,11 +170,6 @@ typedef enum { memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2J_FUNC, #endif #ifndef JNI64 - memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I_FUNC, -#else - memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2J_FUNC, -#endif -#ifndef JNI64 memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2I_FUNC, #else memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2J_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c index b32c0557ce..6c04b64cdc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. All rights reserved. + * Copyright (c) 2000, 2018 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 @@ -352,43 +352,6 @@ void setAtkObjectClassFields(JNIEnv *env, jobject lpObject, AtkObjectClass *lpSt } #endif -#ifndef NO_AtkObjectFactoryClass -typedef struct AtkObjectFactoryClass_FID_CACHE { - int cached; - jclass clazz; - jfieldID create_accessible, invalidate, get_accessible_type; -} AtkObjectFactoryClass_FID_CACHE; - -AtkObjectFactoryClass_FID_CACHE AtkObjectFactoryClassFc; - -void cacheAtkObjectFactoryClassFields(JNIEnv *env, jobject lpObject) -{ - if (AtkObjectFactoryClassFc.cached) return; - AtkObjectFactoryClassFc.clazz = (*env)->GetObjectClass(env, lpObject); - AtkObjectFactoryClassFc.create_accessible = (*env)->GetFieldID(env, AtkObjectFactoryClassFc.clazz, "create_accessible", I_J); - AtkObjectFactoryClassFc.invalidate = (*env)->GetFieldID(env, AtkObjectFactoryClassFc.clazz, "invalidate", I_J); - AtkObjectFactoryClassFc.get_accessible_type = (*env)->GetFieldID(env, AtkObjectFactoryClassFc.clazz, "get_accessible_type", I_J); - AtkObjectFactoryClassFc.cached = 1; -} - -AtkObjectFactoryClass *getAtkObjectFactoryClassFields(JNIEnv *env, jobject lpObject, AtkObjectFactoryClass *lpStruct) -{ - if (!AtkObjectFactoryClassFc.cached) cacheAtkObjectFactoryClassFields(env, lpObject); - lpStruct->create_accessible = (AtkObject *(*)())(*env)->GetIntLongField(env, lpObject, AtkObjectFactoryClassFc.create_accessible); - lpStruct->invalidate = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkObjectFactoryClassFc.invalidate); - lpStruct->get_accessible_type = (GType (*)())(*env)->GetIntLongField(env, lpObject, AtkObjectFactoryClassFc.get_accessible_type); - return lpStruct; -} - -void setAtkObjectFactoryClassFields(JNIEnv *env, jobject lpObject, AtkObjectFactoryClass *lpStruct) -{ - if (!AtkObjectFactoryClassFc.cached) cacheAtkObjectFactoryClassFields(env, lpObject); - (*env)->SetIntLongField(env, lpObject, AtkObjectFactoryClassFc.create_accessible, (jintLong)lpStruct->create_accessible); - (*env)->SetIntLongField(env, lpObject, AtkObjectFactoryClassFc.invalidate, (jintLong)lpStruct->invalidate); - (*env)->SetIntLongField(env, lpObject, AtkObjectFactoryClassFc.get_accessible_type, (jintLong)lpStruct->get_accessible_type); -} -#endif - #ifndef NO_AtkSelectionIface typedef struct AtkSelectionIface_FID_CACHE { int cached; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h index 383ffc7290..d0a5a0ea35 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. All rights reserved. + * Copyright (c) 2000, 2018 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 @@ -90,18 +90,6 @@ void setAtkObjectClassFields(JNIEnv *env, jobject lpObject, AtkObjectClass *lpSt #define AtkObjectClass_sizeof() 0 #endif -#ifndef NO_AtkObjectFactoryClass -void cacheAtkObjectFactoryClassFields(JNIEnv *env, jobject lpObject); -AtkObjectFactoryClass *getAtkObjectFactoryClassFields(JNIEnv *env, jobject lpObject, AtkObjectFactoryClass *lpStruct); -void setAtkObjectFactoryClassFields(JNIEnv *env, jobject lpObject, AtkObjectFactoryClass *lpStruct); -#define AtkObjectFactoryClass_sizeof() sizeof(AtkObjectFactoryClass) -#else -#define cacheAtkObjectFactoryClassFields(a,b) -#define getAtkObjectFactoryClassFields(a,b,c) NULL -#define setAtkObjectFactoryClassFields(a,b,c) -#define AtkObjectFactoryClass_sizeof() 0 -#endif - #ifndef NO_AtkSelectionIface void cacheAtkSelectionIfaceFields(JNIEnv *env, jobject lpObject); AtkSelectionIface *getAtkSelectionIfaceFields(JNIEnv *env, jobject lpObject, AtkSelectionIface *lpStruct); 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 8547094f26..4fc864ba5d 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 @@ -3648,18 +3648,6 @@ JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1TEXTVIEW_1IM_1CONTEXT) } #endif -#ifndef NO_GTK_1TYPE_1ACCESSIBLE -JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1TYPE_1ACCESSIBLE) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1ACCESSIBLE_FUNC); - rc = (jintLong)GTK_TYPE_ACCESSIBLE; - GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1ACCESSIBLE_FUNC); - return rc; -} -#endif - #ifndef NO_GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE) (JNIEnv *env, jclass that) @@ -17251,22 +17239,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1g_1type_1class_1unref) } #endif -#ifndef NO__1g_1type_1from_1name -JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1type_1from_1name) - (JNIEnv *env, jclass that, jbyteArray arg0) -{ - jbyte *lparg0=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1g_1type_1from_1name_FUNC); - if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; - rc = (jintLong)g_type_from_name((const gchar *)lparg0); -fail: - if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); - OS_NATIVE_EXIT(env, that, _1g_1type_1from_1name_FUNC); - return rc; -} -#endif - #ifndef NO__1g_1type_1interface_1peek_1parent JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1type_1interface_1peek_1parent) (JNIEnv *env, jclass that, jintLong arg0) @@ -17291,18 +17263,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1type_1is_1a) } #endif -#ifndef NO__1g_1type_1name -JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1type_1name) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1g_1type_1name_FUNC); - rc = (jintLong)g_type_name((GType)arg0); - OS_NATIVE_EXIT(env, that, _1g_1type_1name_FUNC); - return rc; -} -#endif - #ifndef NO__1g_1type_1parent JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1type_1parent) (JNIEnv *env, jclass that, jintLong arg0) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index 14ad886ebe..60f5e7f8bf 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -277,7 +277,6 @@ char * GTK_nativeFunctionNames[] = { "GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING", "GTK_1ENTRY_1IM_1CONTEXT", "GTK_1TEXTVIEW_1IM_1CONTEXT", - "GTK_1TYPE_1ACCESSIBLE", "GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE", "GTK_1WIDGET_1GET_1CLASS", "GTK_1WIDGET_1REQUISITION_1HEIGHT", @@ -1451,10 +1450,8 @@ char * OS_nativeFunctionNames[] = { "_1g_1type_1class_1peek_1parent", "_1g_1type_1class_1ref", "_1g_1type_1class_1unref", - "_1g_1type_1from_1name", "_1g_1type_1interface_1peek_1parent", "_1g_1type_1is_1a", - "_1g_1type_1name", "_1g_1type_1parent", "_1g_1type_1query", "_1g_1type_1register_1static", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h index 48619c5e11..342e3d01db 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h @@ -275,7 +275,6 @@ typedef enum { GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING_FUNC, GTK_1ENTRY_1IM_1CONTEXT_FUNC, GTK_1TEXTVIEW_1IM_1CONTEXT_FUNC, - GTK_1TYPE_1ACCESSIBLE_FUNC, GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC, GTK_1WIDGET_1GET_1CLASS_FUNC, GTK_1WIDGET_1REQUISITION_1HEIGHT_FUNC, @@ -1437,10 +1436,8 @@ typedef enum { _1g_1type_1class_1peek_1parent_FUNC, _1g_1type_1class_1ref_FUNC, _1g_1type_1class_1unref_FUNC, - _1g_1type_1from_1name_FUNC, _1g_1type_1interface_1peek_1parent_FUNC, _1g_1type_1is_1a_FUNC, - _1g_1type_1name_FUNC, _1g_1type_1parent_FUNC, _1g_1type_1query_FUNC, _1g_1type_1register_1static_FUNC, 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 6af4997e08..825534c13e 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 @@ -198,8 +198,6 @@ public class ATK extends OS { public static final byte[] accessible_table_summary = OS.ascii ("accessible-table-summary"); /** 64 bit */ -public static final native int AtkObjectFactory_sizeof (); -public static final native int AtkObjectFactoryClass_sizeof (); public static final native int AtkAttribute_sizeof (); public static final native int AtkTextRange_sizeof (); public static final native int AtkTextRectangle_sizeof (); @@ -224,7 +222,6 @@ public static final native long /*int*/ ATK_TYPE_TEXT (); public static final native long /*int*/ ATK_TYPE_VALUE (); /** @method flags=const */ public static final native long /*int*/ ATK_TYPE_OBJECT_FACTORY (); -public static final native boolean ATK_IS_NO_OP_OBJECT_FACTORY (long /*int*/ obj); public static final native long /*int*/ _ATK_ACTION_GET_IFACE (long /*int*/ obj); public static final long /*int*/ ATK_ACTION_GET_IFACE (long /*int*/ obj) { lock.lock(); @@ -298,38 +295,6 @@ public static final long /*int*/ ATK_VALUE_GET_IFACE (long /*int*/ handle) { lock.unlock(); } } -public static final native long /*int*/ _atk_get_default_registry (); -public static final long /*int*/ atk_get_default_registry () { - lock.lock(); - try { - return _atk_get_default_registry(); - } finally { - lock.unlock(); - } -} -/** @param factory cast=(AtkObjectFactory *) */ -public static final native long /*int*/ _atk_object_factory_get_accessible_type (long /*int*/ factory); -public static final long /*int*/ atk_object_factory_get_accessible_type (long /*int*/ factory) { - lock.lock(); - try { - return _atk_object_factory_get_accessible_type(factory); - } finally { - lock.unlock(); - } -} -/** - * @param accessible cast=(AtkObject *) - * @param data cast=(gpointer) - */ -public static final native void _atk_object_initialize (long /*int*/ accessible, long /*int*/ data); -public static final void atk_object_initialize (long /*int*/ accessible, long /*int*/ data) { - lock.lock(); - try { - _atk_object_initialize(accessible, data); - } finally { - lock.unlock(); - } -} /** @param accessible cast=(AtkObject *) */ public static final native void _atk_object_notify_state_change (long /*int*/ accessible, int state, boolean value); public static final void atk_object_notify_state_change (long /*int*/ accessible, int state, boolean value) { @@ -369,46 +334,6 @@ public static final boolean atk_object_remove_relationship (long /*int*/ object, } } /** - * @method flags=dynamic - * @param name cast=(const gchar *) - */ -public static final native int _atk_role_register (byte[] name); //Note, deprecated, do not use. See atk docu. -public static final int atk_role_register (byte[] name) { - lock.lock(); - try { - return _atk_role_register(name); - } finally { - lock.unlock(); - } -} -/** - * @param registry cast=(AtkRegistry *) - * @param type cast=(GType) - */ -public static final native long /*int*/ _atk_registry_get_factory (long /*int*/ registry, long /*int*/ type); -public static final long /*int*/ atk_registry_get_factory (long /*int*/ registry, long /*int*/ type) { - lock.lock(); - try { - return _atk_registry_get_factory(registry, type); - } finally { - lock.unlock(); - } -} -/** - * @param registry cast=(AtkRegistry *) - * @param type cast=(GType) - * @param factory_type cast=(GType) - */ -public static final native void _atk_registry_set_factory_type (long /*int*/ registry, long /*int*/ type, long /*int*/ factory_type); -public static final void atk_registry_set_factory_type (long /*int*/ registry, long /*int*/ type, long /*int*/ factory_type) { - lock.lock(); - try { - _atk_registry_set_factory_type(registry, type, factory_type); - } finally { - lock.unlock(); - } -} -/** * @param set cast=(AtkStateSet *) * @param type cast=(AtkStateType) */ @@ -480,7 +405,6 @@ public static final native void memmove (AtkComponentIface dest, long /*int*/ sr public static final native void memmove (AtkEditableTextIface dest, long /*int*/ src); public static final native void memmove (AtkHypertextIface dest, long /*int*/ src); public static final native void memmove (AtkObjectClass dest, long /*int*/ src); -public static final native void memmove (AtkObjectFactoryClass dest, long /*int*/ src); public static final native void memmove (AtkSelectionIface dest, long /*int*/ src); public static final native void memmove (AtkTableIface dest, long /*int*/ src); public static final native void memmove (AtkTextIface dest, long /*int*/ src); @@ -490,7 +414,6 @@ public static final native void memmove (long /*int*/ dest, AtkComponentIface sr public static final native void memmove (long /*int*/ dest, AtkEditableTextIface src); public static final native void memmove (long /*int*/ dest, AtkHypertextIface src); public static final native void memmove (long /*int*/ dest, AtkObjectClass src); -public static final native void memmove (long /*int*/ dest, AtkObjectFactoryClass src); public static final native void memmove (long /*int*/ dest, AtkSelectionIface src); public static final native void memmove (long /*int*/ dest, AtkTableIface src); public static final native void memmove (long /*int*/ dest, AtkTextIface src); 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 deleted file mode 100644 index 2395abaf79..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2012 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. - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.swt.internal.accessibility.gtk; - - -public class AtkObjectFactoryClass { - /** @field cast=(AtkObject *(*)()) */ - public long /*int*/ create_accessible; - /** @field cast=(void (*)()) */ - public long /*int*/ invalidate; - /** @field cast=(GType (*)()) */ - public long /*int*/ get_accessible_type; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java index 80f1a57500..b7e0009c61 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java @@ -277,8 +277,6 @@ public class GTK extends OS { /** @param widget cast=(GtkWidget *) */ public static final native int GTK_WIDGET_REQUISITION_HEIGHT(long /*int*/ widget); /** @method flags=const */ - public static final native long /*int*/ GTK_TYPE_ACCESSIBLE (); - /** @method flags=const */ public static final native long /*int*/ GTK_TYPE_TEXT_VIEW_ACCESSIBLE (); public static final native long /*int*/ _GTK_ACCESSIBLE (long /*int*/ handle); public static final native boolean _GTK_IS_ACCEL_LABEL(long /*int*/ obj); 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 793b5e237b..2431ddf048 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 @@ -2603,16 +2603,6 @@ public static final void g_type_class_unref (long /*int*/ g_class) { lock.unlock(); } } -/** @param name cast=(const gchar *) */ -public static final native long /*int*/ _g_type_from_name (byte[] name); -public static final long /*int*/ g_type_from_name (byte[] name) { - lock.lock(); - try { - return _g_type_from_name(name); - } finally { - lock.unlock(); - } -} /** @param iface cast=(gpointer) */ public static final native long /*int*/ _g_type_interface_peek_parent (long /*int*/ iface); public static final long /*int*/ g_type_interface_peek_parent (long /*int*/ iface) { @@ -2636,16 +2626,6 @@ public static final boolean g_type_is_a (long /*int*/ type, long /*int*/ is_a_ty lock.unlock(); } } -/** @param handle cast=(GType) */ -public static final native long /*int*/ _g_type_name (long /*int*/ handle); -public static final long /*int*/ g_type_name (long /*int*/ handle) { - lock.lock(); - try { - return _g_type_name(handle); - } finally { - lock.unlock(); - } -} /** @param type cast=(GType) */ public static final native long /*int*/ _g_type_parent (long /*int*/ type); public static final long /*int*/ g_type_parent (long /*int*/ type) { |