int get_toolkitName(int /*long*/ pbstrName) { String toolkitName = "SWT"; if (DEBUG) print(this + ".IAccessibleApplication::get_toolkitName() returning" + toolkitName + hresult(COM.S_OK)); setString(pbstrName, toolkitName); return COM.S_OK; }
int get_extendedRole(int /*long*/ pbstrExtendedRole) { /* This feature is not supported. */ setString(pbstrExtendedRole, null); return COM.S_FALSE; }
int get_localizedExtendedRole(int /*long*/ pbstrLocalizedExtendedRole) { /* This feature is not supported. */ setString(pbstrLocalizedExtendedRole, null); return COM.S_FALSE; }
int get_appVersion(int /*long*/ pbstrVersion) { String appVersion = Display.getAppVersion(); if (DEBUG) print(this + ".IAccessibleApplication::get_appVersion() returning" + appVersion + hresult(appVersion == null || appVersion.length() == 0 ? COM.S_FALSE : COM.S_OK)); if (appVersion == null || appVersion.length() == 0) { setString(pbstrVersion, null); return COM.S_FALSE; } setString(pbstrVersion, appVersion); return COM.S_OK; }
int get_appName(int /*long*/ pbstrName) { String appName = Display.getAppName(); if (DEBUG) print(this + ".IAccessibleApplication::get_appName() returning " + appName + hresult(appName == null || appName.length() == 0 ? COM.S_FALSE : COM.S_OK)); if (appName == null || appName.length() == 0) { setString(pbstrName, null); return COM.S_FALSE; } setString(pbstrName, appName); return COM.S_OK; }
int get_toolkitVersion(int /*long*/ pbstrVersion) { String toolkitVersion = "" + SWT.getVersion(); //$NON-NLS-1$ if (DEBUG) print(this + ".IAccessibleApplication::get_toolkitVersion() returning" + toolkitVersion + hresult(COM.S_OK)); setString(pbstrVersion, toolkitVersion); return COM.S_OK; }
int get_extendedStates(int maxExtendedStates, int /*long*/ ppbstrExtendedStates, int /*long*/ pNExtendedStates) { /* This feature is not supported. */ setString(ppbstrExtendedStates, null); COM.MoveMemory(pNExtendedStates, new int [] { 0 }, 4); return COM.S_FALSE; }
int get_localizedExtendedStates(int maxLocalizedExtendedStates, int /*long*/ ppbstrLocalizedExtendedStates, int /*long*/ pNLocalizedExtendedStates) { /* This feature is not supported. */ setString(ppbstrLocalizedExtendedStates, null); COM.MoveMemory(pNLocalizedExtendedStates, new int [] { 0 }, 4); return COM.S_FALSE; }
int get_localizedName(int actionIndex, int /*long*/ pbstrLocalizedName) { AccessibleActionEvent event = new AccessibleActionEvent(this); event.index = actionIndex; event.localized = true; for (int i = 0; i < accessibleActionListenersSize(); i++) { AccessibleActionListener listener = accessibleActionListeners.get(i); listener.getName(event); } if (DEBUG) print(this + ".IAccessibleAction::get_localizedName(" + actionIndex + ") returning " + event.result + hresult(event.result == null || event.result.length() == 0 ? COM.S_FALSE : COM.S_OK)); if (event.result == null || event.result.length() == 0) { setString(pbstrLocalizedName, null); return COM.S_FALSE; } setString(pbstrLocalizedName, event.result); return COM.S_OK; }
int get_name(int actionIndex, int /*long*/ pbstrName) { AccessibleActionEvent event = new AccessibleActionEvent(this); event.index = actionIndex; event.localized = false; for (int i = 0; i < accessibleActionListenersSize(); i++) { AccessibleActionListener listener = accessibleActionListeners.get(i); listener.getName(event); } if (DEBUG) print(this + ".IAccessibleAction::get_name(" + actionIndex + ") returning " + event.result + hresult(event.result == null || event.result.length() == 0 ? COM.S_FALSE : COM.S_OK)); if (event.result == null || event.result.length() == 0) { setString(pbstrName, null); return COM.S_FALSE; } setString(pbstrName, event.result); return COM.S_OK; }
int get_description(int actionIndex, int /*long*/ pbstrDescription) { AccessibleActionEvent event = new AccessibleActionEvent(this); event.index = actionIndex; for (int i = 0; i < accessibleActionListenersSize(); i++) { AccessibleActionListener listener = accessibleActionListeners.get(i); listener.getDescription(event); } if (DEBUG) print(this + ".IAccessibleAction::get_description(" + actionIndex + ") returning " + event.result + hresult(event.result == null || event.result.length() == 0 ? COM.S_FALSE : COM.S_OK)); setString(pbstrDescription, event.result); if (event.result == null || event.result.length() == 0) return COM.S_FALSE; return COM.S_OK; }
int get_oldText(int /*long*/ pOldText) { if (DEBUG) print(this + ".IAccessibleText::get_oldText"); String text = null; int start = 0; int end = 0; if (textDeleted != null) { text = (String) textDeleted[3]; start = ((Integer)textDeleted[1]).intValue(); end = ((Integer)textDeleted[2]).intValue(); } setString(pOldText, text); COM.MoveMemory(pOldText + OS.PTR_SIZEOF, new int [] {start}, 4); COM.MoveMemory(pOldText + OS.PTR_SIZEOF + 4, new int [] {end}, 4); if (textDeleted == null) return COM.S_FALSE; return COM.S_OK; }
int get_newText(int /*long*/ pNewText) { if (DEBUG) print(this + ".IAccessibleText::get_newText"); String text = null; int start = 0; int end = 0; if (textInserted != null) { text = (String) textInserted[3]; start = ((Integer)textInserted[1]).intValue(); end = ((Integer)textInserted[2]).intValue(); } setString(pNewText, text); COM.MoveMemory(pNewText + OS.PTR_SIZEOF, new int [] {start}, 4); COM.MoveMemory(pNewText + OS.PTR_SIZEOF + 4, new int [] {end}, 4); if (textInserted == null) return COM.S_FALSE; return COM.S_OK; }
int get_columnDescription(int column, int /*long*/ pbstrDescription) { AccessibleTableEvent event = new AccessibleTableEvent(this); event.column = column; for (int i = 0; i < accessibleTableListenersSize(); i++) { AccessibleTableListener listener = accessibleTableListeners.get(i); listener.getColumnDescription(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_columnDescription(column=" + column + ") returning " + event.result); setString(pbstrDescription, event.result); if (event.result == null) return COM.S_FALSE; return COM.S_OK; }
int get_rowDescription(int row, int /*long*/ pbstrDescription) { AccessibleTableEvent event = new AccessibleTableEvent(this); event.row = row; for (int i = 0; i < accessibleTableListenersSize(); i++) { AccessibleTableListener listener = accessibleTableListeners.get(i); listener.getRowDescription(event); } if (DEBUG) print(this + ".IAccessibleTable2::get_rowDescription(row=" + row + ") returning " + event.result); setString(pbstrDescription, event.result); if (event.result == null) return COM.S_FALSE; return COM.S_OK; }
int get_keyBinding(int actionIndex, int nMaxBindings, int /*long*/ ppbstrKeyBindings, int /*long*/ pNBindings) { AccessibleActionEvent event = new AccessibleActionEvent(this); event.index = actionIndex; for (int i = 0; i < accessibleActionListenersSize(); i++) { AccessibleActionListener listener = accessibleActionListeners.get(i); listener.getKeyBinding(event); } String keyBindings = event.result; int length = 0; if (keyBindings != null) length = keyBindings.length(); int i = 0, count = 0; while (i < length) { if (count == nMaxBindings) break; int j = keyBindings.indexOf(';', i); if (j == -1) j = length; String keyBinding = keyBindings.substring(i, j); if (keyBinding.length() > 0) { setString(ppbstrKeyBindings + count * OS.PTR_SIZEOF, keyBinding); count++; } i = j + 1; } if (DEBUG) print(this + ".IAccessibleAction::get_keyBinding(index=" + actionIndex + " max=" + nMaxBindings + ") returning count=" + count + hresult(count == 0 ? COM.S_FALSE : COM.S_OK)); COM.MoveMemory(pNBindings, new int [] { count }, 4); if (count == 0) { setString(ppbstrKeyBindings, null); return COM.S_FALSE; } return COM.S_OK; }
setString(pbstrAttributes, attributes); if (attributes.length() == 0) return COM.S_FALSE; return COM.S_OK;
setString(pszDefaultAction, event.result); return COM.S_OK;
setString(pszHelp, event.result); return COM.S_OK;
setString(pbstrText, event.result); if (event.result == null) return COM.E_INVALIDARG; return COM.S_OK;