Example #1
0
        /// <summary>
        /// Return all child xWindows from given xWindow
        /// </summary>
        /// <param name="windowToObtain"></param>
        /// <returns></returns>
        public IEnumerable<XWindow> XQueryTree(XWindow windowToObtain) {
            int root_return, parent_return;
            IntPtr children_return;
            int nchildren_return;

            Xlib.XQueryTree(_handle, windowToObtain.ID, out root_return, out parent_return, out children_return, out nchildren_return);
            var childs = new int[nchildren_return];
            Marshal.Copy(children_return, childs, 0, nchildren_return);

            var wins = new List<XWindow>();
            foreach(int id in childs) {
                wins.Add(new XWindow(this, id));
            }

            return wins;
        }
Example #2
0
        /// <summary>
        /// Return all child xWindows from given xWindow
        /// </summary>
        /// <param name="windowToObtain"></param>
        /// <returns></returns>
        public IEnumerable <XWindow> XQueryTree(XWindow windowToObtain)
        {
            int    root_return, parent_return;
            IntPtr children_return;
            int    nchildren_return;

            Xlib.XQueryTree(_handle, windowToObtain.ID, out root_return, out parent_return, out children_return, out nchildren_return);
            var childs = new int[nchildren_return];

            Marshal.Copy(children_return, childs, 0, nchildren_return);

            var wins = new List <XWindow>();

            foreach (int id in childs)
            {
                wins.Add(new XWindow(this, id));
            }

            return(wins);
        }
Example #3
0
 internal WindowItem(XWindow uxwindow)
     : this(new IntPtr(uxwindow.ID))
 {
     _xwindow = uxwindow;
 }
Example #4
0
 internal LinuxWindow(XWindow uxwindow)
     : this(new IntPtr(uxwindow.ID))
 {
     xwindow = uxwindow;
 }