Ejemplo n.º 1
0
        public void RemoveCursor(D3DCursor cursor)
        {
            mutex.WaitOne();
            cursors.Remove(cursor);

            RemoveD3DCursor(cursor.ID);
            mutex.ReleaseMutex();
        }
Ejemplo n.º 2
0
        public void AddCursor(D3DCursor cursor)
        {
            mutex.WaitOne();
            cursors.Add(cursor);

            AddD3DCursor(cursor.ID, (uint)((((uint)cursor.Color.R) << 16) | (((uint)cursor.Color.G) << 8) | (uint)cursor.Color.B));

            SetD3DCursorPosition(cursor.ID, cursor.X, cursor.Y);
            SetD3DCursorPressed(cursor.ID, cursor.Pressed);
            SetD3DCursorHidden(cursor.ID, cursor.Hidden);
            mutex.ReleaseMutex();
        }
Ejemplo n.º 3
0
        public void AddCursor(D3DCursor cursor)
        {
            mutex.WaitOne();
            cursors.Add(cursor);

            AddD3DCursor(cursor.ID, (uint)((((uint)cursor.Color.R) << 16) | (((uint)cursor.Color.G) << 8) | (uint)cursor.Color.B));

            SetD3DCursorPosition(cursor.ID, cursor.X, cursor.Y);
            SetD3DCursorPressed(cursor.ID, cursor.Pressed);
            SetD3DCursorHidden(cursor.ID, cursor.Hidden);
            mutex.ReleaseMutex();
        }
Ejemplo n.º 4
0
        public bool connect()
        {
            this.useCustomCursor = Settings.Default.pointer_customCursor;
            if (this.useCustomCursor)
            {
                Color myColor = CursorColor.getColor((int)this.id);
                this.masterCursor = new D3DCursor(((int)this.id - 1) * 2, myColor);
                this.slaveCursor  = new D3DCursor(((int)this.id - 1) * 2 + 1, myColor);

                masterCursor.Hide();
                slaveCursor.Hide();

                D3DCursorWindow.Current.AddCursor(masterCursor);
                D3DCursorWindow.Current.AddCursor(slaveCursor);
            }

            this.duoTouch.enableHover();
            if (this.usingCursors())
            {
                this.masterCursor.Show();
            }

            return(true);
        }
Ejemplo n.º 5
0
        public void RemoveCursor(D3DCursor cursor)
        {
            mutex.WaitOne();
            cursors.Remove(cursor);

            RemoveD3DCursor(cursor.ID);
            mutex.ReleaseMutex();
        }