static int /*long*/ atkObjectFactory_create_accessible (int /*long*/ 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 */ int /*long*/ 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.handle; } int /*long*/ widgetType = OS.G_OBJECT_TYPE (widget); int /*long*/ parentType = getParentType (widgetType); if (parentType == 0) parentType = ATK.GTK_TYPE_ACCESSIBLE(); int /*long*/ type = getType (getTypeName(widgetType), accessible, parentType, ACC.CHILDID_SELF); AccessibleObject object = new AccessibleObject (type, widget, accessible, false); accessible.accessibleObject = object; accessible.addRelations (); return object.handle; }
static int /*long*/ atkObjectFactory_create_accessible (int /*long*/ 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 */ int /*long*/ 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.handle; } int /*long*/ widgetType = OS.G_OBJECT_TYPE (widget); int /*long*/ parentType = getParentType (widgetType); if (parentType == 0) parentType = ATK.GTK_TYPE_ACCESSIBLE(); int /*long*/ type = getType (getTypeName(widgetType), accessible, parentType, ACC.CHILDID_SELF); AccessibleObject object = new AccessibleObject (type, widget, accessible, false); accessible.accessibleObject = object; accessible.addRelations (); return object.handle; }
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.handle; } long /*int*/ widgetType = OS.G_OBJECT_TYPE (widget); long /*int*/ parentType = getParentType (widgetType); if (parentType == 0) parentType = ATK.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.handle; }
static void registerAccessible (Accessible accessible) { int /*long*/ widget = accessible.getControlHandle (); int /*long*/ widgetType = OS.G_OBJECT_TYPE (widget); int /*long*/ registry = ATK.atk_get_default_registry (); int /*long*/ 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(null, 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 (); int /*long*/ info = OS.g_malloc (GTypeInfo.sizeof); OS.memmove (info, typeInfo, GTypeInfo.sizeof); int /*long*/ swtFactoryType = OS.g_type_register_static (ATK.ATK_TYPE_OBJECT_FACTORY(), factoryName, info, 0); int /*long*/ 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 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(null, 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 registerAccessible (Accessible accessible) { int /*long*/ widget = accessible.getControlHandle (); int /*long*/ widgetType = OS.G_OBJECT_TYPE (widget); int /*long*/ registry = ATK.atk_get_default_registry (); int /*long*/ 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(null, 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 (); int /*long*/ info = OS.g_malloc (GTypeInfo.sizeof); OS.memmove (info, typeInfo, GTypeInfo.sizeof); int /*long*/ swtFactoryType = OS.g_type_register_static (ATK.ATK_TYPE_OBJECT_FACTORY(), factoryName, info, 0); int /*long*/ 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); }