WPF and regular Win32 windows are now supported

Added support for dragging target on WPF windows and building simple
xpath statements.  Fixed some null results in native library and
increased performance of enumerating wpf windows.  Still need to tweak
filters for picking up Silverlight handles too.
This commit is contained in:
Edward Jakubowski
2014-04-07 22:19:47 -04:00
parent 1809e2ad55
commit bc3c070ea8
20 changed files with 500 additions and 157 deletions

View File

@@ -11,6 +11,7 @@ public ref class WpfAutomation
public:
WpfAutomation(void);
void setFrameworkId(System::String ^propertyValue); //default is WPF, but also accepts Silverlight, Win32
void setTouchableOnly(System::Boolean val); //default is true
//Descendants will walk the full tree of windows, NOT just one level of children
System::Int32 countDescendantWindows();
@@ -22,11 +23,11 @@ public:
array<System::String ^> ^ enumChildrenWindowIds(System::String ^runtimeIdValue); //if runtimeIdValue is null will start at desktop
array<System::String ^> ^ enumDescendantWindowIds(System::String ^runtimeIdValue); //if runtimeIdValue is null will start at desktop
array<System::String ^> ^ enumDescendantWindowIds(System::Int32 processId);
array<System::String ^> ^ EnumDescendantWindowIdsFromHandle(System::IntPtr windowHandle);
//In all the above Enumerate methods will return a list of Runtime Ids for all related windows.
array<System::String ^> ^ EnumDescendantWindowInfo(System::String ^runtimeIdValue, System::String ^properties);
array<System::String ^> ^ enumDescendantWindowInfo(System::String ^runtimeIdValue, System::String ^properties);
System::String ^ getRuntimeIdFromHandle(System::IntPtr windowHandle);
System::String ^ getRuntimeIdFromPoint(System::Int32 x, System::Int32 y);
System::String ^ getParentRuntimeId(System::String ^runtimeIdValue);
System::String ^ getProperty(System::String ^propertyName, System::String ^runtimeIdValue);
array<System::String ^> ^ getProperties(System::String ^runtimeIdValue);
@@ -36,8 +37,11 @@ private:
System::Windows::Automation::AutomationElement ^ findAutomationElementById(System::String ^runtimeIdValue);
System::String ^ getRuntimeIdFromElement(System::Windows::Automation::AutomationElement ^element);
array<System::String ^> ^ getRuntimeIdsFromCollection(System::Windows::Automation::AutomationElementCollection ^collection);
System::Windows::Automation::Condition ^ getSearchConditions();
static System::String ^DEFAULT_FRAMEWORK = L"WPF";
static System::Boolean ^DEFAULT_TOUCHABLE = true;
System::String ^frameworkId;
System::Boolean ^touchableOnly;
};