public List <T> FindChildren <T>(QRegExp regExp) { List <T> list = new List <T>(); AddToListFn addFn = delegate(IntPtr obj) { T o = (T)((System.Runtime.InteropServices.GCHandle)obj).Target; list.Add(o); }; string childClassName = null; IntPtr metaObject = IntPtr.Zero; if (SmokeMarshallers.IsSmokeClass(typeof(T))) { childClassName = SmokeMarshallers.SmokeClassName(typeof(T)); } else { metaObject = (IntPtr)GCHandle.Alloc(Qyoto.GetMetaObject(typeof(T))); } FindQObjectChildren((IntPtr)GCHandle.Alloc(this), childClassName, metaObject, (IntPtr)GCHandle.Alloc(regExp), string.Empty, addFn); return(list); }
private static extern void FindQObjectChildren(IntPtr parent, string childTypeName, IntPtr childMetaObject, IntPtr regexp, string childName, AddToListFn addFn);