Exemplo n.º 1
0
    public static WindowList GetMacWindowList()
    {
        StringBuilder sb = new StringBuilder(CharBufferSize);

        GetWindows(sb, sb.Capacity);

        WindowList macWindows = WindowList.ParseJson(sb.ToString());

        if (macWindows != null)
        {
            Debug.LogWarning("JSON list count = " + macWindows.windows.Count);
            foreach (MacWindowModel win in macWindows.windows)
            {
//                Debug.LogWarning(win.kCGWindowOwnerName + " => " + win.kCGWindowNumber);
            }
        }
        return(macWindows);
    }