[Nvda-dev] commit r3400 - in trunk/source: . NVDAControler NVDAHelper NVDAHelper/common NVDAHelper/interfaces/nvdaController NVDAHelper/interfaces/vbuf NVDAHelper/local NVDAHelper/remote NVDAHelper/vbufBackends/adobeAcrobat NVDAHelper/vbufBackends/gecko_ia2 NVDAHelper/vbufBackends/mshtml NVDAHelper/vbufBase NVDAObjects/IAccessible
NVDA Subversion
svn at nvda-project.org
Tue Dec 1 05:51:40 UTC 2009
Author: bzr
Date: Tue Dec 1 05:51:32 2009
New Revision: 3400
Log:
Merged ia2LiveRegions branch. These changes improve NVDA's support for ARIA live regions in NVDA (For Mozilla Gecko) by moving the live region code in to nvdaHelper (in-process). The code also now handles aria-relevant for addtions, text, all, and not specified. The code handles text changes. These changes also introduce a new implementation of nvdaController, implemented in nvdaHelper. Though a stand-alone client library has not been completed yet.
Added:
trunk/source/NVDAHelper/common/
trunk/source/NVDAHelper/common/debug.cpp
- copied, changed from r3399, /trunk/source/NVDAHelper/vbufBase/debug.cpp
trunk/source/NVDAHelper/common/debug.h
- copied, changed from r3399, /trunk/source/NVDAHelper/vbufBase/debug.h
trunk/source/NVDAHelper/common/ia2utils.cpp
- copied, changed from r3399, /trunk/source/NVDAHelper/vbufBase/ia2utils.cpp
trunk/source/NVDAHelper/common/ia2utils.h
- copied, changed from r3399, /trunk/source/NVDAHelper/vbufBase/ia2utils.h
trunk/source/NVDAHelper/interfaces/nvdaController/
trunk/source/NVDAHelper/interfaces/nvdaController/nvdaController.idl
trunk/source/NVDAHelper/interfaces/nvdaController/sconscript
trunk/source/NVDAHelper/local/nvdaController.c
trunk/source/NVDAHelper/local/rpcSrv.cpp
trunk/source/NVDAHelper/local/rpcSrv.h
trunk/source/NVDAHelper/remote/ia2LiveRegions.cpp
trunk/source/NVDAHelper/remote/ia2LiveRegions.h
Removed:
trunk/source/NVDAControler/
trunk/source/NVDAControler.py
trunk/source/NVDAHelper/vbufBase/debug.cpp
trunk/source/NVDAHelper/vbufBase/debug.h
trunk/source/NVDAHelper/vbufBase/ia2utils.cpp
trunk/source/NVDAHelper/vbufBase/ia2utils.h
Modified:
trunk/source/IAccessibleHandler.py
trunk/source/NVDAHelper.py
trunk/source/NVDAHelper/interfaces/vbuf/sconscript
trunk/source/NVDAHelper/local/nvdaHelperLocal.cpp
trunk/source/NVDAHelper/local/sconscript
trunk/source/NVDAHelper/remote/nvdaHelperRemote.cpp
trunk/source/NVDAHelper/remote/sconscript
trunk/source/NVDAHelper/sconstruct
trunk/source/NVDAHelper/vbufBackends/adobeAcrobat/adobeAcrobat.cpp
trunk/source/NVDAHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp
trunk/source/NVDAHelper/vbufBackends/gecko_ia2/sconscript
trunk/source/NVDAHelper/vbufBackends/mshtml/mshtml.cpp
trunk/source/NVDAHelper/vbufBackends/mshtml/node.cpp
trunk/source/NVDAHelper/vbufBase/backend.cpp
trunk/source/NVDAHelper/vbufBase/lock.cpp
trunk/source/NVDAHelper/vbufBase/sconscript
trunk/source/NVDAHelper/vbufBase/storage.cpp
trunk/source/NVDAObjects/IAccessible/__init__.py
Modified: trunk/source/IAccessibleHandler.py
==============================================================================
--- trunk/source/IAccessibleHandler.py (original)
+++ trunk/source/IAccessibleHandler.py Tue Dec 1 05:51:32 2009
@@ -471,7 +471,6 @@
winUser.EVENT_OBJECT_FOCUS:"gainFocus",
winUser.EVENT_OBJECT_SHOW:"show",
winUser.EVENT_OBJECT_DESTROY:"destroy",
-winUser.EVENT_OBJECT_HIDE:"hide",
winUser.EVENT_OBJECT_DESCRIPTIONCHANGE:"descriptionChange",
winUser.EVENT_OBJECT_LOCATIONCHANGE:"locationChange",
winUser.EVENT_OBJECT_NAMECHANGE:"nameChange",
@@ -727,6 +726,14 @@
eventHandler.queueEvent(*NVDAEvent)
return True
+def processShowWinEvent(window,objectID,childID):
+ className=winUser.getClassName(window)
+ #For now we only support 'show' event for tooltips as otherwize we get flooded
+ if className=="tooltips_class32" and objectID==winUser.OBJID_CLIENT:
+ NVDAEvent=winEventToNVDAEvent(winUser.EVENT_OBJECT_SHOW,window,objectID,childID)
+ if NVDAEvent:
+ eventHandler.queueEvent(*NVDAEvent)
+
def processDestroyWinEvent(window,objectID,childID):
"""Process a destroy win event.
This removes the object associated with the event parameters from L{liveNVDAObjectTable} if such an object exists.
@@ -806,6 +813,8 @@
processDesktopSwitchWinEvent(*winEvent[1:])
elif winEvent[0]==winUser.EVENT_OBJECT_DESTROY:
processDestroyWinEvent(*winEvent[1:])
+ elif winEvent[0]==winUser.EVENT_OBJECT_SHOW:
+ processShowWinEvent(*winEvent[1:])
elif winEvent[0] in MENU_EVENTIDS+(winUser.EVENT_SYSTEM_SWITCHEND,):
# If there is no valid focus event, we may need to use this to fake the focus later.
fakeFocusEvent=winEvent
Modified: trunk/source/NVDAHelper.py
==============================================================================
--- trunk/source/NVDAHelper.py (original)
+++ trunk/source/NVDAHelper.py Tue Dec 1 05:51:32 2009
@@ -11,6 +11,7 @@
import globalVars
from logHandler import log
import time
+import globalVars
EVENT_TYPEDCHARACTER=0X1000
EVENT_INPUTLANGCHANGE=0X1001
@@ -23,6 +24,22 @@
winEventHookID=None
+#utility function to point an exported function pointer in a dll to a ctypes wrapped python function
+def _setDllFuncPointer(dll,name,cfunc):
+ cast(getattr(dll,name),POINTER(c_void_p)).contents.value=cast(cfunc,c_void_p).value
+
+#Implementation of nvdaController methods
+ at CFUNCTYPE(None,POINTER(c_wchar_p))
+def nvdaController_getNVDAVersionString(version):
+ import versionInfo
+ version.contents.value=versionInfo.version
+
+ at CFUNCTYPE(None,c_long,c_wchar_p)
+def nvdaController_speakText(bindingHandle,text):
+ import queueHandler
+ import speech
+ queueHandler.queueFunction(queueHandler.eventQueue,speech.speakText,text)
+
def handleTypedCharacter(window,wParam,lParam):
focus=api.getFocusObject()
if focus.windowClassName!="ConsoleWindowClass":
@@ -83,6 +100,8 @@
def initialize():
global _remoteLib, _remoteLoader64, localLib, winEventHookID,generateBeep
localLib=cdll.LoadLibrary('lib/nvdaHelperLocal.dll')
+ _setDllFuncPointer(localLib,"_nvdaController_speakText",nvdaController_speakText)
+ localLib.startServer()
generateBeep=localLib.generateBeep
generateBeep.argtypes=[c_char_p,c_float,c_uint,c_ubyte,c_ubyte]
generateBeep.restype=c_uint
Added: trunk/source/NVDAHelper/interfaces/nvdaController/nvdaController.idl
==============================================================================
--- (empty file)
+++ trunk/source/NVDAHelper/interfaces/nvdaController/nvdaController.idl Tue Dec 1 05:51:32 2009
@@ -0,0 +1,26 @@
+//NVDAController_appModuleHelper.idl
+
+/**
+ * Allows the controling of NVDA from a remote process
+ */
+[
+ uuid(ec0ac5e3-de3f-49dc-b9d8-571abd7ddd92),
+ version(1.0),
+]
+interface NvdaController {
+
+/**
+ * Retreaves the version of NVDA.
+ * @param bindinghandle_t the binding handle_t to NVDA
+ * @param version a pointer to the version string, must be freed when finnished with
+ */
+ boolean getNVDAVersionString([in] handle_t bindingHandle, [out,string] wchar_t** version);
+
+/**
+ * Instructs NVDA to speak the given text.
+ * @param text the text to speak.
+ */
+ boolean speakText([in] handle_t bindingHandle, [in,string] const wchar_t* text);
+
+};
+
Added: trunk/source/NVDAHelper/interfaces/nvdaController/sconscript
==============================================================================
--- (empty file)
+++ trunk/source/NVDAHelper/interfaces/nvdaController/sconscript Tue Dec 1 05:51:32 2009
@@ -0,0 +1,11 @@
+Import('env')
+
+#We need to hack in server and client prefixes in MIDLFLAGS
+env=env.Clone()
+env.Append(MIDLFLAGS=['/prefix','all','nvdaController_'])
+
+headerFile,clientSourceFile,serverSourceFile=env.MSRPCStubs(source=['nvdaController.idl'])
+clientObjFile=env.Object(clientSourceFile)
+serverObjFile=Object(serverSourceFile)
+
+Return(['headerFile','clientObjFile','serverObjFile'])
Modified: trunk/source/NVDAHelper/interfaces/vbuf/sconscript
==============================================================================
--- trunk/source/NVDAHelper/interfaces/vbuf/sconscript (original)
+++ trunk/source/NVDAHelper/interfaces/vbuf/sconscript Tue Dec 1 05:51:32 2009
@@ -1,7 +1,7 @@
Import('env')
#We need to hack in server and client prefixes in MIDLFLAGS
-#env=env.Clone()
+env=env.Clone()
env.Append(MIDLFLAGS=['/prefix','server','VBufRemote_','/prefix','client','VBuf_'])
headerFile,clientSourceFile,serverSourceFile=env.MSRPCStubs(source=['vbuf.idl'])
Added: trunk/source/NVDAHelper/local/nvdaController.c
==============================================================================
--- (empty file)
+++ trunk/source/NVDAHelper/local/nvdaController.c Tue Dec 1 05:51:32 2009
@@ -0,0 +1,12 @@
+#include <windows.h>
+#include <interfaces/nvdaController/nvdaController.h>
+
+__declspec(dllexport) RPC_STATUS(*_nvdaController_getNVDAVersionString)(handle_t,wchar_t**);
+boolean nvdaController_getNVDAVersionString(handle_t bindingHandle, wchar_t** version) {
+ return _nvdaController_getNVDAVersionString(bindingHandle,version);
+}
+
+__declspec(dllexport) RPC_STATUS(*_nvdaController_speakText)(handle_t,const wchar_t*);
+boolean nvdaController_speakText(handle_t bindingHandle, const wchar_t* text) {
+ return _nvdaController_speakText(bindingHandle,text);
+}
Modified: trunk/source/NVDAHelper/local/nvdaHelperLocal.cpp
==============================================================================
--- trunk/source/NVDAHelper/local/nvdaHelperLocal.cpp (original)
+++ trunk/source/NVDAHelper/local/nvdaHelperLocal.cpp Tue Dec 1 05:51:32 2009
@@ -17,13 +17,3 @@
void destroyConnection(handle_t bindingHandle) {
RpcBindingFree(&bindingHandle);
}
-
-//memory allocation functions
-
-void* __RPC_USER midl_user_allocate(size_t size) {
- return malloc(size);
-}
-
-void __RPC_USER midl_user_free(void* p) {
- free(p);
-}
Added: trunk/source/NVDAHelper/local/rpcSrv.cpp
==============================================================================
--- (empty file)
+++ trunk/source/NVDAHelper/local/rpcSrv.cpp Tue Dec 1 05:51:32 2009
@@ -0,0 +1,43 @@
+#include <cstdio>
+#include <sstream>
+#include <windows.h>
+#include <interfaces/nvdaController/nvdaController.h>
+#include "rpcSrv.h"
+
+//memory allocation functions
+
+void* __RPC_USER midl_user_allocate(size_t size) {
+ return malloc(size);
+}
+
+void __RPC_USER midl_user_free(void* p) {
+ free(p);
+}
+
+RPC_STATUS startServer() {
+ RPC_STATUS status;
+ //Set the protocol
+ status=RpcServerUseProtseqEp((RPC_WSTR)L"ncalrpc",RPC_C_PROTSEQ_MAX_REQS_DEFAULT,(RPC_WSTR)L"nvdaController",NULL);
+ //We can ignore the error where the endpoint is already set
+ if(status!=RPC_S_OK&&status!=RPC_S_DUPLICATE_ENDPOINT) {
+ return status;
+ }
+ //Register the interfaces
+ if((status=RpcServerRegisterIf(nvdaController_NvdaController_v1_0_s_ifspec,NULL,NULL))!=RPC_S_OK) {
+ return status;
+ }
+ //Start listening
+ if((status=RpcServerListen(1,RPC_C_LISTEN_MAX_CALLS_DEFAULT,TRUE))!=RPC_S_OK) {
+ return status;
+ }
+ CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)RpcMgmtWaitServerListen,NULL,0,NULL);
+ return status;
+}
+
+RPC_STATUS stopServer() {
+ RPC_STATUS status;
+ if((status=RpcServerUnregisterIf(nvdaController_NvdaController_v1_0_s_ifspec,NULL,1))!=RPC_S_OK) {
+ return status;
+ }
+ return RpcMgmtStopServerListening(NULL);
+}
Added: trunk/source/NVDAHelper/local/rpcSrv.h
==============================================================================
--- (empty file)
+++ trunk/source/NVDAHelper/local/rpcSrv.h Tue Dec 1 05:51:32 2009
@@ -0,0 +1,14 @@
+//Copyright (c) 2007 Michael Curran <mick at kulgan.net>
+//This file is covered by the GNU General Public Licence
+
+#ifndef RPCSRV_H
+#define RPCSRV_H
+
+#include <windows.h>
+
+#define DLLEXPORT extern "C" __declspec(dllexport)
+
+DLLEXPORT RPC_STATUS startServer();
+DLLEXPORT RPC_STATUS stopServer();
+
+#endif
Modified: trunk/source/NVDAHelper/local/sconscript
==============================================================================
--- trunk/source/NVDAHelper/local/sconscript (original)
+++ trunk/source/NVDAHelper/local/sconscript Tue Dec 1 05:51:32 2009
@@ -1,8 +1,8 @@
-Import(['env','vbufRPCStubs'])
+Import(['env','vbufRPCStubs','nvdaControllerRPCStubs'])
localLib=env.SharedLibrary(
target="nvdaHelperLocal",
- source=["nvdaHelperLocal.cpp","beeps.cpp",vbufRPCStubs[1]],
+ source=["nvdaHelperLocal.cpp","beeps.cpp",vbufRPCStubs[1],'rpcSrv.cpp','nvdaController.c',nvdaControllerRPCStubs[2]],
LIBS=["rpcrt4"],
)
Added: trunk/source/NVDAHelper/remote/ia2LiveRegions.cpp
==============================================================================
--- (empty file)
+++ trunk/source/NVDAHelper/remote/ia2LiveRegions.cpp Tue Dec 1 05:51:32 2009
@@ -0,0 +1,193 @@
+#include <string>
+#include <sstream>
+#include <windows.h>
+#include <ia2/ia2.h>
+#include <interfaces/nvdaController/nvdaController.h>
+#include <common/ia2utils.h>
+#include "nvdaHelperRemote.h"
+
+using namespace std;
+
+handle_t bindingHandle;
+
+void speakText(const wchar_t* text) {
+ RpcTryExcept {
+ nvdaController_speakText(bindingHandle,text);
+ } RpcExcept(1) {
+ return;
+ } RpcEndExcept;
+}
+
+void getTextFromIAccessible(wstring& textBuf, IAccessible2* pacc2, bool useNewText=false, bool recurse=true) {
+ IAccessibleText* paccText=NULL;
+ if(pacc2->QueryInterface(IID_IAccessibleText,(void**)&paccText)!=S_OK||!paccText) {
+ long childCount=0;
+ if(pacc2->get_accChildCount(&childCount)!=S_OK) {
+ textBuf.append(L"unknown");
+ return;
+ }
+ VARIANT* varChildren=new VARIANT[childCount];
+ AccessibleChildren(pacc2,0,childCount,varChildren,&childCount);
+ for(int i=0;i<childCount;i++) {
+ if(varChildren[i].vt==VT_DISPATCH) {
+ IAccessible2* pacc2Child=NULL;
+ if(varChildren[i].pdispVal->QueryInterface(IID_IAccessible2,(void**)&pacc2Child)==S_OK) {
+ getTextFromIAccessible(textBuf,pacc2Child,false,true);
+ pacc2Child->Release();
+ }
+ }
+ VariantClear(varChildren+i);
+ }
+ delete varChildren;
+ return;
+ }
+ //We can use IAccessibleText because it exists
+ BSTR bstrText=NULL;
+ long startOffset=0;
+ //If requested, get the text from IAccessibleText::newText rather than just IAccessibleText::text.
+ if(useNewText) {
+ IA2TextSegment newSeg={0};
+ if(paccText->get_newText(&newSeg)==S_OK&&newSeg.text) {
+ bstrText=newSeg.text;
+ startOffset=newSeg.start;
+ }
+ } else {
+ paccText->get_text(0,-1,&bstrText);
+ }
+ //If we got text, add it to the string provided, however if there are embedded objects in the text, recurse in to these
+ if(bstrText) {
+ long textLength=SysStringLen(bstrText);
+ IAccessibleHypertext* paccHypertext=NULL;
+ if(!recurse||pacc2->QueryInterface(IID_IAccessibleHypertext,(void**)&paccHypertext)!=S_OK) paccHypertext=NULL;
+ if(!paccHypertext) {
+ textBuf.append(bstrText);
+ } else {
+ for(long index=0;index<textLength;index++) {
+ wchar_t realChar=bstrText[index];
+ bool charAdded=false;
+ if(realChar==L'\xfffc') {
+ long hyperlinkIndex;
+ if(paccHypertext&&paccHypertext->get_hyperlinkIndex(startOffset+index,&hyperlinkIndex)==S_OK) {
+ IAccessibleHyperlink* paccHyperlink=NULL;
+ if(paccHypertext->get_hyperlink(hyperlinkIndex,&paccHyperlink)==S_OK) {
+ IAccessible2* pacc2Child=NULL;
+ if(paccHyperlink->QueryInterface(IID_IAccessible2,(void**)&pacc2Child)==S_OK) {
+ getTextFromIAccessible(textBuf,pacc2Child);
+ charAdded=true;
+ pacc2Child->Release();
+ }
+ paccHyperlink->Release();
+ }
+ }
+ }
+ if(!charAdded) {
+ textBuf.append(1,realChar);
+ charAdded=true;
+ }
+ }
+ paccHypertext->Release();
+ }
+ SysFreeString(bstrText);
+ textBuf.append(1,L' ');
+ }
+ paccText->Release();
+}
+
+void CALLBACK winEventProcHook(HWINEVENTHOOK hookID, DWORD eventID, HWND hwnd, long objectID, long childID, DWORD threadID, DWORD time) {
+ HWND fgHwnd=GetForegroundWindow();
+ //Ignore events for windows that are invisible or are not in the foreground
+ if(!IsWindowVisible(hwnd)||(hwnd!=fgHwnd&&!IsChild(fgHwnd,hwnd))) return;
+ //Ignore all events but a few types
+ switch(eventID) {
+ case EVENT_OBJECT_SHOW:
+ case EVENT_OBJECT_HIDE:
+ case IA2_EVENT_TEXT_INSERTED:
+ break;
+ default:
+ return;
+ }
+ IAccessible* pacc=NULL;
+ IServiceProvider* pserv=NULL;
+ IAccessible2* pacc2=NULL;
+ VARIANT varChild;
+ //Try getting the IAccessible from the event
+ if(AccessibleObjectFromEvent(hwnd,objectID,childID,&pacc,&varChild)!=S_OK) {
+ return;
+ }
+ //Retreave the object states, and if its invisible or offscreen ignore the event.
+ VARIANT varState;
+ pacc->get_accState(varChild,&varState);
+ VariantClear(&varChild);
+ if(varState.vt==VT_I4&&(varState.lVal&STATE_SYSTEM_INVISIBLE)) {
+ VariantClear(&varState);
+ pacc->Release();
+ return;
+ }
+ VariantClear(&varState);
+ //Retreave an IAccessible2 via IServiceProvider if it exists.
+ pacc->QueryInterface(IID_IServiceProvider,(void**)(&pserv));
+ pacc->Release();
+ if(!pserv) return;
+ pserv->QueryService(IID_IAccessible,IID_IAccessible2,(void**)(&pacc2));
+ pserv->Release();
+ if(!pacc2) return;
+ //Retreave the IAccessible2 attributes, and if the object is not a live region then ignore the event.
+ BSTR attribs=NULL;
+ pacc2->get_attributes(&attribs);
+ if(!attribs) {
+ pacc2->Release();
+ return;
+ }
+ map<wstring,wstring> attribsMap;
+ IA2AttribsToMap(attribs,attribsMap);
+ SysFreeString(attribs);
+ map<wstring,wstring>::iterator i;
+ i=attribsMap.find(L"container-live");
+ bool live=(i!=attribsMap.end()&&(i->second.compare(L"polite")==0||i->second.compare(L"assertive")==0||i->second.compare(L"rude")==0));
+ if(!live) {
+ pacc2->Release();
+ return;
+ }
+ i=attribsMap.find(L"container-relevant");
+ bool allowAdditions=false;
+ bool allowText=false;
+ //If relevant is not specify we will default to additions and text, if all is specified then we also use additions and text
+ if(i==attribsMap.end()||i->second.compare(L"all")==0) {
+ allowText=allowAdditions=true;
+ } else { //we support additions if its specified, we support text if its specified
+ allowText=(i->second.find(L"text",0)!=wstring::npos);
+ allowAdditions=(i->second.find(L"additions",0)!=wstring::npos);
+ }
+ //If additions and text are specified, and this is a show event, turn off allowText if this IAccessible's parent doesn't support accessibleText.
+ //This is necessary so that we still announce additions via the show event, rather than waiting for the textInserted event which will never arrive.
+ if(allowText&&allowAdditions&&eventID==EVENT_OBJECT_SHOW) {
+ IDispatch* pdispParent=NULL;
+ pacc2->get_accParent(&pdispParent);
+ if(pdispParent) {
+ IAccessibleText* paccTextParent=NULL;
+ if(pdispParent->QueryInterface(IID_IAccessibleText,(void**)&paccTextParent)!=S_OK) {
+ allowText=false;
+ } else {
+ paccTextParent->Release();
+ }
+ pdispParent->Release();
+ }
+ }
+ wstring textBuf;
+ if(!allowText&&allowAdditions&&eventID==EVENT_OBJECT_SHOW) {
+ getTextFromIAccessible(textBuf,pacc2,false,true);
+ } else if(allowText&&eventID==IA2_EVENT_TEXT_INSERTED) {
+ getTextFromIAccessible(textBuf,pacc2,true,allowAdditions);
+ }
+ if(!textBuf.empty()) speakText(textBuf.c_str());
+}
+
+void ia2LiveRegions_inProcess_initialize() {
+ RpcBindingFromStringBinding((RPC_WSTR)L"ncalrpc:[nvdaController]",&bindingHandle);
+ registerWinEventHook(winEventProcHook);
+}
+
+void ia2LiveRegions_inProcess_terminate() {
+ unregisterWinEventHook(winEventProcHook);
+ RpcBindingFree(&bindingHandle);
+}
Added: trunk/source/NVDAHelper/remote/ia2LiveRegions.h
==============================================================================
--- (empty file)
+++ trunk/source/NVDAHelper/remote/ia2LiveRegions.h Tue Dec 1 05:51:32 2009
@@ -0,0 +1,7 @@
+#ifndef IA2LIVEREGIONS_H
+#define IA2LIVEREGIONS_H
+
+void ia2LiveRegions_inProcess_initialize();
+void ia2LiveRegions_inProcess_terminate();
+
+#endif
Modified: trunk/source/NVDAHelper/remote/nvdaHelperRemote.cpp
==============================================================================
--- trunk/source/NVDAHelper/remote/nvdaHelperRemote.cpp (original)
+++ trunk/source/NVDAHelper/remote/nvdaHelperRemote.cpp Tue Dec 1 05:51:32 2009
@@ -14,6 +14,7 @@
#include "inputLangChange.h"
#include "typedCharacter.h"
#include "IA2Support.h"
+#include "ia2LiveRegions.h"
#include "nvdaHelperRemote.h"
using namespace std;
@@ -46,6 +47,7 @@
assert(!inProcess_wasInitializedOnce);
rpcSrv_inProcess_initialize();
IA2Support_inProcess_initialize();
+ ia2LiveRegions_inProcess_initialize();
typedCharacter_inProcess_initialize();
inputLangChange_inProcess_initialize();
inProcess_isRunning=inProcess_wasInitializedOnce=true;
@@ -56,6 +58,7 @@
assert(inProcess_wasInitializedOnce);
inputLangChange_inProcess_terminate();
typedCharacter_inProcess_terminate();
+ ia2LiveRegions_inProcess_terminate();
IA2Support_inProcess_terminate();
rpcSrv_inProcess_terminate();
inProcess_isRunning=false;
Modified: trunk/source/NVDAHelper/remote/sconscript
==============================================================================
--- trunk/source/NVDAHelper/remote/sconscript (original)
+++ trunk/source/NVDAHelper/remote/sconscript Tue Dec 1 05:51:32 2009
@@ -1,9 +1,11 @@
-Import(['env','ia2RPCStubs','vbufRPCStubs'])
+Import(['env','ia2RPCStubs','vbufRPCStubs','nvdaControllerRPCStubs'])
+
+ia2utilsObj=env.Object("./ia2utils","#common/ia2utils.cpp")
remoteLib=env.SharedLibrary(
target="nvdaHelperRemote",
- source=["nvdaHelperRemote.cpp","inputLangChange.cpp","typedCharacter.cpp","ia2Support.cpp",ia2RPCStubs[2],"rpcSrv.cpp","vbufRemote.cpp",vbufRPCStubs[2]],
- LIBS=["user32","ole32","rpcrt4","shlwapi"],
+ source=["nvdaHelperRemote.cpp","inputLangChange.cpp","typedCharacter.cpp","ia2Support.cpp","ia2LiveRegions.cpp",ia2utilsObj,ia2RPCStubs[2],"rpcSrv.cpp","vbufRemote.cpp",vbufRPCStubs[2],nvdaControllerRPCStubs[1]],
+ LIBS=["user32","ole32","rpcrt4","shlwapi","oleaut32","oleacc"],
)
Return('remoteLib')
Modified: trunk/source/NVDAHelper/sconstruct
==============================================================================
--- trunk/source/NVDAHelper/sconstruct (original)
+++ trunk/source/NVDAHelper/sconstruct Tue Dec 1 05:51:32 2009
@@ -39,12 +39,13 @@
ia2RPCStubs=env.SConscript('ia2_sconscript')
vbufRPCStubs=env.SConscript('interfaces/vbuf/sconscript')
+nvdaControllerRPCStubs=env.SConscript('interfaces/nvdaController/sconscript')
if TARGET_ARCH=='x86':
- localLib=env.SConscript('local/sconscript',exports=['vbufRPCStubs'])
+ localLib=env.SConscript('local/sconscript',exports=['vbufRPCStubs','nvdaControllerRPCStubs'])
neededTargets.append(localLib)
-remoteLib=env.SConscript('remote/sconscript',exports=['ia2RPCStubs','vbufRPCStubs'])
+remoteLib=env.SConscript('remote/sconscript',exports=['ia2RPCStubs','vbufRPCStubs','nvdaControllerRPCStubs'])
neededTargets.append(remoteLib)
if TARGET_ARCH=='x86_64':
Modified: trunk/source/NVDAHelper/vbufBackends/adobeAcrobat/adobeAcrobat.cpp
==============================================================================
--- trunk/source/NVDAHelper/vbufBackends/adobeAcrobat/adobeAcrobat.cpp (original)
+++ trunk/source/NVDAHelper/vbufBackends/adobeAcrobat/adobeAcrobat.cpp Tue Dec 1 05:51:32 2009
@@ -14,7 +14,7 @@
#include <oleacc.h>
#include <remote/nvdaHelperRemote.h>
#include <vbufBase/backend.h>
-#include <vbufBase/debug.h>
+#include <common/debug.h>
#include <AcrobatAccess/AcrobatAccess.h>
#include <AcrobatAccess/IPDDom.h>
#include "adobeAcrobat.h"
Modified: trunk/source/NVDAHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp
==============================================================================
--- trunk/source/NVDAHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp (original)
+++ trunk/source/NVDAHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp Tue Dec 1 05:51:32 2009
@@ -12,10 +12,10 @@
#include <string>
#include <sstream>
#include <ia2/ia2.h>
-#include <vbufBase/ia2utils.h>
+#include <common/ia2utils.h>
#include <remote/nvdaHelperRemote.h>
#include <vbufBase/backend.h>
-#include <vbufBase/debug.h>
+#include <common/debug.h>
#include <vbufBase/utils.h>
#include "gecko_ia2.h"
Modified: trunk/source/NVDAHelper/vbufBackends/gecko_ia2/sconscript
==============================================================================
--- trunk/source/NVDAHelper/vbufBackends/gecko_ia2/sconscript (original)
+++ trunk/source/NVDAHelper/vbufBackends/gecko_ia2/sconscript Tue Dec 1 05:51:32 2009
@@ -1,8 +1,10 @@
Import(['env','vbufBaseStaticLib','ia2RPCStubs'])
+ia2utilsObj=env.Object("./ia2utils","#common/ia2utils.cpp")
+
geckoBackendLib=env.SharedLibrary(
target="VBufBackend_gecko_ia2",
- source=["gecko_ia2.cpp","#vbufBase/ia2Utils.cpp",ia2RPCStubs[2]],
+ source=["gecko_ia2.cpp",ia2utilsObj,ia2RPCStubs[2]],
LIBS=[vbufBaseStaticLib,"user32","kernel32","oleacc","oleaut32"],
)
Modified: trunk/source/NVDAHelper/vbufBackends/mshtml/mshtml.cpp
==============================================================================
--- trunk/source/NVDAHelper/vbufBackends/mshtml/mshtml.cpp (original)
+++ trunk/source/NVDAHelper/vbufBackends/mshtml/mshtml.cpp Tue Dec 1 05:51:32 2009
@@ -18,7 +18,7 @@
#include <sstream>
#include <vbufBase/backend.h>
#include <vbufBase/utils.h>
-#include <vbufBase/debug.h>
+#include <common/debug.h>
#include "node.h"
#include "mshtml.h"
Modified: trunk/source/NVDAHelper/vbufBackends/mshtml/node.cpp
==============================================================================
--- trunk/source/NVDAHelper/vbufBackends/mshtml/node.cpp (original)
+++ trunk/source/NVDAHelper/vbufBackends/mshtml/node.cpp Tue Dec 1 05:51:32 2009
@@ -11,7 +11,7 @@
#include <windows.h>
#include <oleidl.h>
#include <mshtml.h>
-#include <vbufBase/debug.h>
+#include <common/debug.h>
#include "mshtml.h"
#include "node.h"
Modified: trunk/source/NVDAHelper/vbufBase/backend.cpp
==============================================================================
--- trunk/source/NVDAHelper/vbufBase/backend.cpp (original)
+++ trunk/source/NVDAHelper/vbufBase/backend.cpp Tue Dec 1 05:51:32 2009
@@ -9,7 +9,7 @@
#include <cassert>
#include <windows.h>
#include <remote/nvdaHelperRemote.h>
-#include "debug.h"
+#include <common/debug.h>
#include "storage.h"
#include "backend.h"
Modified: trunk/source/NVDAHelper/vbufBase/lock.cpp
==============================================================================
--- trunk/source/NVDAHelper/vbufBase/lock.cpp (original)
+++ trunk/source/NVDAHelper/vbufBase/lock.cpp Tue Dec 1 05:51:32 2009
@@ -9,7 +9,7 @@
#ifdef _WIN32
#include <windows.h>
#endif
-#include "debug.h"
+#include <common/debug.h>
#include "lock.h"
VBufLock_t::VBufLock_t() {
Modified: trunk/source/NVDAHelper/vbufBase/sconscript
==============================================================================
--- trunk/source/NVDAHelper/vbufBase/sconscript (original)
+++ trunk/source/NVDAHelper/vbufBase/sconscript Tue Dec 1 05:51:32 2009
@@ -1,8 +1,10 @@
Import(['env','remoteLib'])
+debugObj=env.Object("./debug","#common/debug.cpp")
+
vbufBaseStaticLib=env.StaticLibrary(
target="vbufBase_static",
- source=["storage.cpp","utils.cpp","lock.cpp","backend.cpp","debug.cpp",remoteLib[1] if env['release'] else remoteLib[2]],
+ source=["storage.cpp","utils.cpp","lock.cpp","backend.cpp",debugObj,remoteLib[1] if env['release'] else remoteLib[2]],
)
Return('vbufBaseStaticLib')
Modified: trunk/source/NVDAHelper/vbufBase/storage.cpp
==============================================================================
--- trunk/source/NVDAHelper/vbufBase/storage.cpp (original)
+++ trunk/source/NVDAHelper/vbufBase/storage.cpp Tue Dec 1 05:51:32 2009
@@ -14,7 +14,7 @@
#include <list>
#include <set>
#include <sstream>
-#include "debug.h"
+#include <common/debug.h>
#include "utils.h"
#include "storage.h"
Modified: trunk/source/NVDAObjects/IAccessible/__init__.py
==============================================================================
--- trunk/source/NVDAObjects/IAccessible/__init__.py (original)
+++ trunk/source/NVDAObjects/IAccessible/__init__.py Tue Dec 1 05:51:32 2009
@@ -1045,20 +1045,6 @@
child.speakDescendantObjects(hashList=hashList)
child=child.next
- def event_show(self):
- if not winUser.isDescendantWindow(winUser.getForegroundWindow(),self.windowHandle) or not winUser.isWindowVisible(self.windowHandle) or controlTypes.STATE_INVISIBLE in self.states:
- return
- try:
- attribs=self.IAccessibleObject.attributes
- except:
- return
- if attribs and ('live:polite' in attribs or 'live:assertive' in attribs):
- text=IAccessibleHandler.getRecursiveTextFromIAccessibleTextObject(self.IAccessibleObject)
- if text and not text.isspace():
- if 'live:rude' in attribs:
- speech.cancelSpeech()
- speech.speakMessage(text)
-
def event_gainFocus(self):
if hasattr(self,'IAccessibleTextObject'):
self.initAutoSelectDetection()
More information about the Nvda-dev
mailing list