Beispiel #1
0
       internal MouseDevice(InputManager inputManager)
       {
            _inputManager = new SecurityCriticalData<InputManager>(inputManager);
            _inputManager.Value.PreProcessInput += new PreProcessInputEventHandler(PreProcessInput);
            _inputManager.Value.PreNotifyInput += new NotifyInputEventHandler(PreNotifyInput);
            _inputManager.Value.PostProcessInput += new ProcessInputEventHandler(PostProcessInput);

            // Get information about how far two clicks of a double click can be considered
            // to be in the "same place and time".
            //
            // The call here goes into the safe helper calls, more of a consistency in approach
            //
            _doubleClickDeltaX = SafeSystemMetrics.DoubleClickDeltaX;
            _doubleClickDeltaY = SafeSystemMetrics.DoubleClickDeltaY;
            _doubleClickDeltaTime = SafeNativeMethods.GetDoubleClickTime();

            _overIsEnabledChangedEventHandler = new DependencyPropertyChangedEventHandler(OnOverIsEnabledChanged);
            _overIsVisibleChangedEventHandler = new DependencyPropertyChangedEventHandler(OnOverIsVisibleChanged);
            _overIsHitTestVisibleChangedEventHandler  = new DependencyPropertyChangedEventHandler(OnOverIsHitTestVisibleChanged);
            _reevaluateMouseOverDelegate = new DispatcherOperationCallback(ReevaluateMouseOverAsync);
            _reevaluateMouseOverOperation = null;

            _captureIsEnabledChangedEventHandler = new DependencyPropertyChangedEventHandler(OnCaptureIsEnabledChanged);
            _captureIsVisibleChangedEventHandler = new DependencyPropertyChangedEventHandler(OnCaptureIsVisibleChanged);
            _captureIsHitTestVisibleChangedEventHandler  = new DependencyPropertyChangedEventHandler(OnCaptureIsHitTestVisibleChanged);
            _reevaluateCaptureDelegate = new DispatcherOperationCallback(ReevaluateCaptureAsync);
            _reevaluateCaptureOperation = null;

            _inputManager.Value.HitTestInvalidatedAsync += new EventHandler(OnHitTestInvalidatedAsync);
        }
Beispiel #2
0
        internal StylusLogic(InputManager inputManager) 
        { 
            _inputManager = new SecurityCriticalData<InputManager>(inputManager);;
            _inputManager.Value.PreProcessInput   += new PreProcessInputEventHandler(PreProcessInput); 
            _inputManager.Value.PreNotifyInput    += new NotifyInputEventHandler(PreNotifyInput);
            _inputManager.Value.PostProcessInput  += new ProcessInputEventHandler(PostProcessInput);

#if !MULTICAPTURE 
            _overIsEnabledChangedEventHandler = new DependencyPropertyChangedEventHandler(OnOverIsEnabledChanged);
            _overIsVisibleChangedEventHandler = new DependencyPropertyChangedEventHandler(OnOverIsVisibleChanged); 
            _overIsHitTestVisibleChangedEventHandler = new DependencyPropertyChangedEventHandler(OnOverIsHitTestVisibleChanged); 
            _reevaluateStylusOverDelegate = new DispatcherOperationCallback(ReevaluateStylusOverAsync);
            _reevaluateStylusOverOperation = null; 

            _captureIsEnabledChangedEventHandler = new DependencyPropertyChangedEventHandler(OnCaptureIsEnabledChanged);
            _captureIsVisibleChangedEventHandler = new DependencyPropertyChangedEventHandler(OnCaptureIsVisibleChanged);
            _captureIsHitTestVisibleChangedEventHandler = new DependencyPropertyChangedEventHandler(OnCaptureIsHitTestVisibleChanged); 
            _reevaluateCaptureDelegate = new DispatcherOperationCallback(ReevaluateCaptureAsync);
            _reevaluateCaptureOperation = null; 
#endif 

 
            _shutdownHandler = new EventHandler(this.OnDispatcherShutdown);
            _processDisplayChanged = new DispatcherOperationCallback(ProcessDisplayChanged);
            _processDeferredMouseMove = new DispatcherOperationCallback(ProcessDeferredMouseMove);
 
            ReadSystemConfig();
 
            _dlgInputManagerProcessInput = new DispatcherOperationCallback(InputManagerProcessInput); 
        }
        internal TextServicesManager(InputManager inputManager) 
        {
            _inputManager = inputManager; 
 
            _inputManager.PreProcessInput += new PreProcessInputEventHandler(PreProcessInput);
            _inputManager.PostProcessInput += new ProcessInputEventHandler(PostProcessInput); 
        }
Beispiel #4
0
        public void SubClass(IntPtr owner)
        {
            Owner = owner;
            _inputManager = InputManager.Current;
            _dispatcher   = _inputManager.Dispatcher;

            _inputManager.PreProcessInput += OnPreProcessInputEventHandler;
            _inputManager.EnterMenuMode   += OnEnterMenuMode;

            //Debug.WriteLine("SubClass(): " + owner);
        }
		public MultitouchInputProvider(PresentationSource source)
		{
			this.source = source;
			contactsQueue = new Queue<RawMultitouchReport>();
			inputManagerProcessInput = InputManagerProcessInput;

            contactHandler = new ContactHandler(((HwndSource)source).Handle);
            contactHandler.ContactMoved += HandleContact;
            contactHandler.ContactRemoved += HandleContact;
            contactHandler.NewContact += HandleContact;

			inputManager = InputManager.Current;
			multitouchLogic = MultitouchLogic.Current;
		}
Beispiel #6
0
		MultitouchLogic(InputManager inputManager)
		{
			if (!MouseHelper.SingleMouseFallback && !MultitouchScreen.AllowNonContactEvents)    //modified by Wander
				Mouse.OverrideCursor = Cursors.None;

			ContactsManager = new ContactsManager(inputManager.Dispatcher);

			this.inputManager = inputManager;
			this.inputManager.PreProcessInput += inputManager_PreProcessInput;
			this.inputManager.PreNotifyInput += inputManager_PreNotifyInput;
			this.inputManager.PostProcessInput += inputManager_PostProcessInput;
			contactType = typeof(Contact);

			Dispatcher.ShutdownFinished += Dispatcher_ShutdownFinished;

			Type routedEventType = typeof(RoutedEvent);
			contactEvents = typeof(MultitouchScreen).GetFields().Where(m => m.FieldType == routedEventType).Select(f => (RoutedEvent)f.GetValue(null));
		}
Beispiel #7
0
        protected KeyboardDevice(InputManager inputManager)
        { 
            _inputManager = new SecurityCriticalDataClass<InputManager>(inputManager);
            _inputManager.Value.PreProcessInput += new PreProcessInputEventHandler(PreProcessInput); 
            _inputManager.Value.PreNotifyInput += new NotifyInputEventHandler(PreNotifyInput); 
            _inputManager.Value.PostProcessInput += new ProcessInputEventHandler(PostProcessInput);
 
            _isEnabledChangedEventHandler = new DependencyPropertyChangedEventHandler(OnIsEnabledChanged);
            _isVisibleChangedEventHandler = new DependencyPropertyChangedEventHandler(OnIsVisibleChanged);
            _focusableChangedEventHandler = new DependencyPropertyChangedEventHandler(OnFocusableChanged);
 
            _reevaluateFocusCallback = new DispatcherOperationCallback(ReevaluateFocusCallback);
            _reevaluateFocusOperation = null; 
 
            //
 

            _TsfManager = new SecurityCriticalDataClass<TextServicesManager>(new TextServicesManager(inputManager));
            _textcompositionManager = new SecurityCriticalData<TextCompositionManager>(new TextCompositionManager(inputManager));
        } 
Beispiel #8
0
 internal virtual void Reset(StagingAreaInputItem input, InputManager inputManager)
 {
     _input = input;
     _inputManager = inputManager;
 }
 internal DefaultTextStoreTextComposition(InputManager inputManager, IInputElement source, string text, TextCompositionAutoComplete autoComplete) : base(inputManager, source, text, autoComplete)
 { 
 } 
 internal TextCompositionManager(InputManager inputManager) 
 {
     _inputManager = inputManager;
     _inputManager.PreProcessInput += new PreProcessInputEventHandler(PreProcessInput);
     _inputManager.PostProcessInput += new ProcessInputEventHandler(PostProcessInput); 
 }
Beispiel #11
0
 internal CommandDevice(InputManager inputManager)
 {
     _inputManager = new SecurityCriticalData <InputManager>(inputManager);
     _inputManager.Value.PreProcessInput  += new PreProcessInputEventHandler(PreProcessInput);
     _inputManager.Value.PostProcessInput += new ProcessInputEventHandler(PostProcessInput);
 }
 protected KeyboardDevice(InputManager inputManager)
 {
 }
 public TextComposition(InputManager inputManager, System.Windows.IInputElement source, string resultText, TextCompositionAutoComplete autoComplete)
 {
 }
		internal NotifyInputEventArgs (InputManager inputManager,
					       StagingAreaInputItem stagingItem)
		{
			this.inputManager = inputManager;
			this.stagingItem = stagingItem;
		}
Beispiel #15
0
		public X11MouseDevice (InputManager manager)
			: base (manager)
		{
		}
Beispiel #16
0
 internal InputProviderSite(InputManager inputManager, IInputProvider inputProvider)
 { 
     _inputManager = new SecurityCriticalDataClass<InputManager>(inputManager); 
     _inputProvider = new SecurityCriticalDataClass<IInputProvider>(inputProvider);
 } 
Beispiel #17
0
 internal Win32KeyboardDevice(InputManager inputManager)
     : base(inputManager)
 {
 }
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        //
        // Constructor for TextStore's TextComposition.
        //
        internal FrameworkTextComposition(InputManager inputManager, IInputElement source, object owner)  : base(inputManager, source, String.Empty, TextCompositionAutoComplete.Off)
        {
            _owner = owner;
        }
		internal ProcessInputEventArgs (InputManager inputManager,
						StagingAreaInputItem stagingItem)
			: base (inputManager, stagingItem)
		{
		}
Beispiel #20
0
		public TextComposition (InputManager inputManager, IInputElement source, string resultText)
		{
		}
Beispiel #21
0
 internal CommandDevice( InputManager inputManager )
 {
     _inputManager = new SecurityCriticalData<InputManager>(inputManager);
     _inputManager.Value.PreProcessInput += new PreProcessInputEventHandler(PreProcessInput);
     _inputManager.Value.PostProcessInput += new ProcessInputEventHandler(PostProcessInput);
 }
        //----------------------------------------------------- 
        //
        //  Constructors
        //
        //----------------------------------------------------- 

        #region Constructors 
 
        internal FrameworkRichTextComposition(InputManager inputManager, IInputElement source, object owner)  : base(inputManager, source, owner)
        { 
        }
Beispiel #23
0
        private static InputManager GetCurrentInputManagerImpl()
        {
            InputManager inputManager = null;

            Dispatcher dispatcher = Dispatcher.CurrentDispatcher;
            inputManager = dispatcher.InputManager as InputManager;

            if (inputManager == null)
            {
                inputManager = new InputManager();
                dispatcher.InputManager = inputManager;
            }

            return inputManager;
        }
Beispiel #24
0
 internal Win32MouseDevice(InputManager inputManager)
     : base(inputManager)
 {
 }
Beispiel #25
0
 public MockKeyboardDevice(InputManager manager)
     : base(manager)
 {
 }
 internal DeadCharTextComposition(InputManager inputManager, IInputElement source, string text, TextCompositionAutoComplete autoComplete, InputDevice inputDevice) : base(inputManager, source, text, autoComplete, inputDevice)
 {
 }
Beispiel #27
0
 public TextComposition(InputManager inputManager, IInputElement source, string resultText, TextCompositionAutoComplete autoComplete) : this(inputManager, source, resultText, autoComplete, InputManager.Current.PrimaryKeyboardDevice)
 { 
     // We should avoid using Enum.IsDefined for performance and correct versioning.
     if ((autoComplete != TextCompositionAutoComplete.Off) && 
         (autoComplete != TextCompositionAutoComplete.On)) 
     {
         throw new InvalidEnumArgumentException("autoComplete", 
                                                (int)autoComplete,
                                                typeof(TextCompositionAutoComplete));
     }
 } 
 internal override void Reset(StagingAreaInputItem input, InputManager inputManager)
 {
     _canceled = false;
     base.Reset(input, inputManager);
 }
Beispiel #29
0
        internal TextComposition(InputManager inputManager, IInputElement source, string resultText, TextCompositionAutoComplete autoComplete, InputDevice inputDevice)
        { 
            _inputManager = inputManager; 

            _inputDevice = inputDevice; 

            if (resultText == null)
            {
                throw new ArgumentException(SR.Get(SRID.TextComposition_NullResultText)); 
            }
 
            _resultText = resultText; 
            _compositionText = "";
            _systemText = ""; 
            _systemCompositionText = "";
            _controlText = "";

            _autoComplete = autoComplete; 

            _stage = TextCompositionStage.None; 
 
            // source of this text composition.
            _source = source; 
        }
Beispiel #30
0
 internal DefaultKeyboardDevice(InputManager inputManager)
     : base(inputManager)
 {
 }
Beispiel #31
0
        //------------------------------------------------------ 
        //
        //  Constructors 
        //
        //-----------------------------------------------------

        #region Constructors 

        /// <summary> 
        ///     The constrcutor of TextComposition class. 
        /// </summary>
        public TextComposition(InputManager inputManager, IInputElement source, string resultText) : this(inputManager, source,  resultText, TextCompositionAutoComplete.On) 
        {
        }