AtspiUiaSource.AutomationSource.GetRootElements C# (CSharp) Method

GetRootElements() public method

public GetRootElements ( ) : IElement[]
return IElement[]
		public IElement [] GetRootElements ()
		{
			List<Accessible> elements = new List<Accessible> ();
			foreach (Accessible element in Desktop.Instance.Children)
				foreach (Accessible child in element.Children)
					if (Element.GetElement (child).Parent == null)
						elements.Add (child);
			IElement [] ret = new IElement [elements.Count];
			int i = 0;
			foreach (Accessible accessible in elements)
				ret [i++] = Element.GetElement (accessible);
			Log.Debug ("AtspiUiaSource: GetRootElements count will be: " + ret.Length);
			return ret;
		}