Ejemplo n.º 1
0
        public UwcWindow(int id)
        {
            this.id = id;
            isAlive = true;

            onCaptured.AddListener(OnCaptured);
            onSizeChanged.AddListener(OnSizeChanged);
            onIconCaptured.AddListener(OnIconCaptured);

            CreateIconTexture();

            parentWindow = UwcManager.FindParent(id);
            if (parentWindow != null)
            {
                parentWindow.onChildAdded.Invoke(this);
            }
        }
        void UpdateWindow()
        {
            if (window_ != null)
            {
                return;
            }

            var window = UwcManager.Find(partialWindowName, false);

            if (window == null)
            {
                return;
            }

            window_ = window;
            window_.onChildAdded.AddListener(OnChildAdded);
            window_.onChildRemoved.AddListener(OnChildRemoved);
        }
Ejemplo n.º 3
0
        private static UwcManager CreateInstance()
        {
            if (instance_ != null)
            {
                return(instance_);
            }

            var manager = FindObjectOfType <UwcManager>();

            if (manager)
            {
                instance_ = manager;
                return(manager);
            }

            var go = new GameObject("uWindowCapture");

            instance_ = go.AddComponent <UwcManager>();
            return(instance_);
        }
Ejemplo n.º 4
0
        void UpdateTargetWindow()
        {
            if (!shouldUpdateWindow)
            {
                return;
            }

            switch (type)
            {
            case WindowTextureType.Window:
                window = UwcManager.Find(partialWindowTitle, altTabWindow);
                break;

            case WindowTextureType.Desktop:
                window = UwcManager.FindDesktop(desktopIndex);
                break;

            case WindowTextureType.Child:
                break;
            }
        }