Example #1
0
        public WindowsHook(IntPtr hWnd)
        {
            this.hWnd = hWnd;

            wndProcDelegate = WndProcHook;

            CreateHook();
        }
Example #2
0
 public WM_TouchHook(IntPtr hWnd, HookType hookType) : base(hWnd, hookType)
 {
     this.scalingFactorX = 1f;
     this.scalingFactorY = 1f;
     DisableNativePressAndHoldGesture = true;
     this.mdTouchInputSize            = Marshal.SizeOf(new TOUCHINPUT());
     this.gestureDelegate             = new Win32.WndProcDelegate(this.GestureWndProc);
 }
Example #3
0
 public WM_TouchHook(IntPtr hWnd, HookType hookType) : base(hWnd, hookType)
 {
     this.scalingFactorX = 1f;
     this.scalingFactorY = 1f;
     DisableNativePressAndHoldGesture = true;
     this.mdTouchInputSize = Marshal.SizeOf(new TOUCHINPUT());
     this.gestureDelegate = new Win32.WndProcDelegate(this.GestureWndProc);
 }
Example #4
0
        public WindowsHook(IntPtr hWnd)
        {
            this.hWnd = hWnd;

            wndProcDelegate = WndProcHook;

            CreateHook();
        }
        public WM_TouchHook(IntPtr hWnd, HookType hookType)
            : base(hWnd, hookType)                   //HookType.WH_CALLWNDPROC) //HookType.WH_GETMESSAGE)
        {
            DisableNativePressAndHoldGesture = true; // false;
            //HookInvoked += new HookEventHandler(TouchHookInvoked);

            mdTouchInputSize = Marshal.SizeOf(new TOUCHINPUT());
            gestureDelegate  = new Win32.WndProcDelegate(this.GestureWndProc);
        }
Example #6
0
 public ImGuiXNAFormsHook(IntPtr handleForm, HookDelegate hook)
 {
     HandleForm   = handleForm;
     Hook         = hook;
     _WndProcHook = WndProcHook;
     HandleHook   = Win32.SetWindowsHookEx(
         4, _WndProcHook, IntPtr.Zero,
         Win32.GetWindowThreadProcessId(HandleForm, IntPtr.Zero)
         );
 }
Example #7
0
 public XNAFormsHook(IntPtr handleForm, HookDelegate hook)
 {
     HandleForm   = handleForm;
     Hook         = hook;
     _WndProcHook = WndProcHook;
     HandleHook   = Win32.SetWindowsHookEx(
         Win32.HookType.WH_GETMESSAGE, // Was WH_CALLWNDPROC in ImGuiXNA
         _WndProcHook,
         IntPtr.Zero,
         Win32.GetWindowThreadProcessId(HandleForm, IntPtr.Zero)
         );
 }
        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
            case Win32.WM_PARENTNOTIFY:
                DropDownHandle = m.LParam;
                oldWndProc     = Win32.GetWindowLong(DropDownHandle, Win32.GWL_WNDPROC);
                newWndProc     = new Win32.WndProcDelegate(ReplacementWndProc);
                Win32.SetWindowLong(DropDownHandle, Win32.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(newWndProc));
                break;
            }

            base.WndProc(ref m);
        }
Example #9
0
        void MobileRemoteUI_Load(object sender, EventArgs e)
        {
            _mProc       = new Win32.WndProcDelegate(WndProc);
            _mOldWndProc = Win32.SetWindowLong(this.Handle, Win32.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(_mProc));

            System.Windows.Forms.Timer shownTimer = new System.Windows.Forms.Timer();
            shownTimer.Interval = 100;
            shownTimer.Tick    += new EventHandler(shownTimer_Tick);

            shownTimer.Enabled = true;
            MobileRemoteLoadEvent.Set();

            SetIMEMode();
        }
Example #10
0
        protected override void WndProc(ref System.Windows.Forms.Message m)
        {
            switch (m.Msg)
            {
                case Win32.WM_PARENTNOTIFY:
                    DropDownHandle = m.LParam;
                    oldWndProc = Win32.GetWindowLong(DropDownHandle, Win32.GWL_WNDPROC);
                    newWndProc = new Win32.WndProcDelegate(ReplacementWndProc);
                    Win32.SetWindowLong(DropDownHandle, Win32.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(newWndProc));
                    break;
            }

            base.WndProc(ref m);
        }
Example #11
0
        void MobileRemoteUI_Load(object sender, EventArgs e)
        {
            _mProc = new Win32.WndProcDelegate(WndProc);
            _mOldWndProc = Win32.SetWindowLong(this.Handle, Win32.GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(_mProc));

            System.Windows.Forms.Timer shownTimer = new System.Windows.Forms.Timer();
            shownTimer.Interval = 100;
            shownTimer.Tick += new EventHandler(shownTimer_Tick);

            shownTimer.Enabled = true;
            MobileRemoteLoadEvent.Set();

            SetIMEMode();
        }