System.Windows.Automation.NativeMethods.GetChildWindowHandles C# (CSharp) Méthode

GetChildWindowHandles() private static méthode

private static GetChildWindowHandles ( IntPtr rootWin ) : System.IntPtr[]
rootWin System.IntPtr
Résultat System.IntPtr[]
		private static IntPtr [] GetChildWindowHandles (IntPtr rootWin) {
			IntPtr rootReturn;
			IntPtr parentReturn;
			IntPtr childrenReturn;
			int childrenReturnCount;
			try {
				IntPtr dpy = gdk_x11_display_get_xdisplay (Gdk.Display.Default.Handle);
				if (XQueryTree (dpy, rootWin, out rootReturn, out parentReturn,
				                out childrenReturn, out childrenReturnCount) == 0)
					return new IntPtr [0];
				IntPtr [] children = new IntPtr [childrenReturnCount];
				if (childrenReturnCount > 0)
					Marshal.Copy (childrenReturn, children, 0, childrenReturnCount);
				return children;
			} catch (Exception ex) {
				Log.Error ("Error, probably due to calling GDK or XQueryTree: {0}", ex.Message);
				return new IntPtr [0];
			}
		}