Changeset 238:380bad9f6852 for dwt/accessibility/AccessibleFactory.d
- Timestamp:
- 05/04/08 18:42:55 (4 years ago)
- Files:
-
- dwt/accessibility/AccessibleFactory.d (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/accessibility/AccessibleFactory.d
r158 r238 13 13 module dwt.accessibility.AccessibleFactory; 14 14 15 import dwt.dwthelper.utils; 16 15 17 16 18 import dwt.internal.accessibility.gtk.ATK; … … 36 38 Accessible[GtkWidget*] accessibles; 37 39 38 static long[ char[]] Types;40 static long[String] Types; 39 41 static AccessibleFactory[long] Factories; 40 42 41 43 static uint DefaultParentType; //$NON-NLS-1$ 42 static const char[]FACTORY_PARENTTYPENAME = "AtkObjectFactory";43 static const char[]SWT_TYPE_PREFIX = "DWT";44 static const char[]CHILD_TYPENAME = "Child";45 static const char[]FACTORY_TYPENAME = "SWTFactory";44 static const String FACTORY_PARENTTYPENAME = "AtkObjectFactory"; 45 static const String SWT_TYPE_PREFIX = "DWT"; 46 static const String CHILD_TYPENAME = "Child"; 47 static const String FACTORY_TYPENAME = "SWTFactory"; 46 48 static const int[] actionRoles = [ 47 49 ACC.ROLE_CHECKBUTTON, ACC.ROLE_COMBOBOX, ACC.ROLE_LINK, … … 97 99 private this (int /*long*/ widgetType) { 98 100 widgetTypeName = OS.g_type_name (widgetType); 99 char[]factoryName = FACTORY_TYPENAME ~ fromStringz( widgetTypeName ) ~ \0;101 String factoryName = FACTORY_TYPENAME ~ fromStringz( widgetTypeName ) ~ \0; 100 102 if (OS.g_type_from_name (factoryName.ptr) is 0) { 101 103 /* register the factory */ … … 139 141 return accessible.accessibleObject.handle; 140 142 } 141 char[]buffer = fromStringz( widgetTypeName ).dup;143 String buffer = fromStringz( widgetTypeName ).dup; 142 144 auto type = getType (buffer, accessible, objectParentType, ACC.CHILDID_SELF); 143 145 AccessibleObject object = new AccessibleObject (type, cast(GtkWidget*)widget, accessible, objectParentType, false); … … 159 161 } 160 162 161 static int /*long*/ getType ( char[]widgetTypeName, Accessible accessible, int /*long*/ parentType, int childId) {163 static int /*long*/ getType (String widgetTypeName, Accessible accessible, int /*long*/ parentType, int childId) { 162 164 AccessibleControlEvent event = new AccessibleControlEvent (accessible); 163 165 event.childID = childId; … … 195 197 action = hypertext = selection = text = true; 196 198 } 197 char[]swtTypeName = SWT_TYPE_PREFIX.dup;199 String swtTypeName = SWT_TYPE_PREFIX.dup; 198 200 swtTypeName ~= widgetTypeName; 199 201 if (action) swtTypeName ~= "Action"; //$NON-NLS-1$
