import mouseHandler\r
from NVDAObjects.window import Window\r
from NVDAObjects.IAccessible import sysListView32, IAccessible\r
-from NVDAObjects.UIA import UIA\r
+import UIAHandler\r
+if UIAHandler.isUIAAvailable:\r
+ from NVDAObjects.UIA import UIA\r
\r
#win8hack: Class to disable incorrect focus on windows 8 search box (containing the already correctly focused edit field)\r
class SearchBoxClient(IAccessible):\r
return\r
super(NotificationArea, self).event_gainFocus()\r
\r
-class GridTileElement(UIA):\r
+if UIAHandler.isUIAAvailable:\r
+ class GridTileElement(UIA):\r
\r
- role=controlTypes.ROLE_TABLECELL\r
+ role=controlTypes.ROLE_TABLECELL\r
\r
- def _get_description(self):\r
- name=self.name\r
- descriptionStrings=[]\r
- for child in self.children:\r
- description=child.basicText\r
- if not description or description==name: continue\r
- descriptionStrings.append(description)\r
- return " ".join(descriptionStrings)\r
- return description\r
+ def _get_description(self):\r
+ name=self.name\r
+ descriptionStrings=[]\r
+ for child in self.children:\r
+ description=child.basicText\r
+ if not description or description==name: continue\r
+ descriptionStrings.append(description)\r
+ return " ".join(descriptionStrings)\r
+ return description\r
\r
-class GridListTileElement(UIA):\r
- role=controlTypes.ROLE_TABLECELL\r
- description=None\r
+ class GridListTileElement(UIA):\r
+ role=controlTypes.ROLE_TABLECELL\r
+ description=None\r
\r
class AppModule(appModuleHandler.AppModule):\r
\r
clsList.insert(0, NotificationArea)\r
return\r
\r
- if isinstance(obj, UIA):\r
+ if UIAHandler.isUIAAvailable and isinstance(obj, UIA):\r
uiaClassName = obj.UIAElement.cachedClassName\r
if uiaClassName == "GridTileElement":\r
clsList.insert(0, GridTileElement)\r