• R/O
  • HTTP
  • SSH
  • HTTPS

nvdajp: コミット

NVDA with Japanese branch


コミットメタ情報

リビジョン3d1ebac42da58070828e8ff28bce54df32f35116 (tree)
日時2014-03-13 11:18:09
作者Takuya Nishimoto <nishimotz@gmai...>
コミッターTakuya Nishimoto

ログメッセージ

reverted t3800 regarding ti33037

変更サマリ

差分

--- a/source/_UIAHandler.py
+++ b/source/_UIAHandler.py
@@ -118,55 +118,6 @@ UIAEventIdsToNVDAEventNames={
118118 #UIA_ToolTipClosedEventId:"hide",
119119 }
120120
121-class MsaaProxyFactory(COMObject):
122- """Overrides the default MSAA proxy so it only handles windows for which NVDA uses UIA.
123- Generally, the MSAA proxy isn't needed, as NVDA uses MSAA directly,
124- so UIA proxying is redundant.
125- However, some native UIA implementations depend on the MSAA proxy.
126- """
127- _com_interfaces_ = [IUIAutomationProxyFactoryEntry, IUIAutomationProxyFactory]
128-
129- def __init__(self, baseEntry):
130- self.baseEntry = baseEntry
131- self.baseFactory = baseEntry.ProxyFactory
132- super(MsaaProxyFactory, self).__init__()
133- self.factory = self.QueryInterface(IUIAutomationProxyFactory)
134-
135- # Forward most methods.
136- def IUIAutomationProxyFactoryEntry__get_AllowSubstringMatch(self):
137- return self.baseEntry.AllowSubstringMatch
138- def IUIAutomationProxyFactoryEntry__get_CanCheckBaseClass(self):
139- return self.baseEntry.CanCheckBaseClass
140- def IUIAutomationProxyFactoryEntry__get_ClassName(self):
141- return self.baseEntry.ClassName
142- def IUIAutomationProxyFactoryEntry__get_ImageName(self):
143- return self.baseEntry.ImageName
144- def IUIAutomationProxyFactoryEntry__get_NeedsAdviseEvents(self):
145- return self.baseEntry.NeedsAdviseEvents
146-
147- def IUIAutomationProxyFactoryEntry_GetWinEventsForAutomationEvent(self, eventId, propertyId):
148- try:
149- return self.baseEntry.GetWinEventsForAutomationEvent(eventId, propertyId)
150- except IndexError:
151- # comtypes can't seem to handle a NULL safearray pointer.
152- return ()
153-
154- def IUIAutomationProxyFactoryEntry__get_ProxyFactory(self):
155- return self.factory
156-
157- def IUIAutomationProxyFactory__get_ProxyFactoryId(self):
158- return u"NVDA: MSAA Proxy"
159-
160- def IUIAutomationProxyFactory_CreateProvider(self, hwnd, idObject, idChild):
161- from UIAHandler import handler
162- if not handler:
163- # Still initialising.
164- return None
165- if not handler.isUIAWindow(hwnd):
166- # NVDA won't use UIA for this window at all, so don't proxy for it.
167- return None
168- return self.baseFactory.CreateProvider(hwnd, idObject, idChild)
169-
170121 class UIAHandler(COMObject):
171122 _com_interfaces_=[IUIAutomationEventHandler,IUIAutomationFocusChangedEventHandler,IUIAutomationPropertyChangedEventHandler]
172123
@@ -191,27 +142,10 @@ class UIAHandler(COMObject):
191142 windll.kernel32.CloseHandle(MTAThreadHandle)
192143 del self.MTAThread
193144
194- def setUIAProxies(self):
195- neededProxyIDs={'Microsoft: TreeView Proxy'}
196- mapping=self.clientObject.proxyFactoryMapping
197- msaaEntry = None
198- for index in reversed(xrange(mapping.count)):
199- entry=mapping.getEntry(index)
200- pfId = entry.proxyFactory.proxyFactoryId
201- if pfId=="Microsoft: MSAA Proxy":
202- msaaEntry = entry
203- if pfId not in neededProxyIDs:
204- mapping.removeEntry(index)
205-
206- if not msaaEntry:
207- return
208- mapping.InsertEntry(mapping.Count, MsaaProxyFactory(msaaEntry))
209-
210145 def MTAThreadFunc(self):
211146 try:
212147 oledll.ole32.CoInitializeEx(None,comtypes.COINIT_MULTITHREADED)
213148 self.clientObject=CoCreateInstance(CUIAutomation._reg_clsid_,interface=IUIAutomation,clsctx=CLSCTX_INPROC_SERVER)
214- self.setUIAProxies()
215149 self.windowTreeWalker=self.clientObject.createTreeWalker(self.clientObject.CreateNotCondition(self.clientObject.CreatePropertyCondition(UIA_NativeWindowHandlePropertyId,0)))
216150 self.windowCacheRequest=self.clientObject.CreateCacheRequest()
217151 self.windowCacheRequest.AddProperty(UIA_NativeWindowHandlePropertyId)
旧リポジトリブラウザで表示