예제 #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);
        }
예제 #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); 
        }
예제 #3
0
        internal TextServicesManager(InputManager inputManager) 
        {
            _inputManager = inputManager; 
 
            _inputManager.PreProcessInput += new PreProcessInputEventHandler(PreProcessInput);
            _inputManager.PostProcessInput += new ProcessInputEventHandler(PostProcessInput); 
        }
예제 #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);
        }
예제 #5
0
		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;
		}
예제 #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));
		}
예제 #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));
        } 
예제 #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)
 { 
 } 
예제 #10
0
 internal TextCompositionManager(InputManager inputManager) 
 {
     _inputManager = inputManager;
     _inputManager.PreProcessInput += new PreProcessInputEventHandler(PreProcessInput);
     _inputManager.PostProcessInput += new ProcessInputEventHandler(PostProcessInput); 
 }
예제 #11
0
파일: CommandDevice.cs 프로젝트: sososu/wpf
 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)
 {
 }
예제 #14
0
		internal NotifyInputEventArgs (InputManager inputManager,
					       StagingAreaInputItem stagingItem)
		{
			this.inputManager = inputManager;
			this.stagingItem = stagingItem;
		}
예제 #15
0
		public X11MouseDevice (InputManager manager)
			: base (manager)
		{
		}
예제 #16
0
 internal InputProviderSite(InputManager inputManager, IInputProvider inputProvider)
 { 
     _inputManager = new SecurityCriticalDataClass<InputManager>(inputManager); 
     _inputProvider = new SecurityCriticalDataClass<IInputProvider>(inputProvider);
 } 
예제 #17
0
 internal Win32KeyboardDevice(InputManager inputManager)
     : base(inputManager)
 {
 }
예제 #18
0
        //------------------------------------------------------
        //
        //  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;
        }
예제 #19
0
		internal ProcessInputEventArgs (InputManager inputManager,
						StagingAreaInputItem stagingItem)
			: base (inputManager, stagingItem)
		{
		}
예제 #20
0
		public TextComposition (InputManager inputManager, IInputElement source, string resultText)
		{
		}
예제 #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)
        { 
        }
예제 #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;
        }
예제 #24
0
 internal Win32MouseDevice(InputManager inputManager)
     : base(inputManager)
 {
 }
예제 #25
0
 public MockKeyboardDevice(InputManager manager)
     : base(manager)
 {
 }
예제 #26
0
 internal DeadCharTextComposition(InputManager inputManager, IInputElement source, string text, TextCompositionAutoComplete autoComplete, InputDevice inputDevice) : base(inputManager, source, text, autoComplete, inputDevice)
 {
 }
예제 #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));
     }
 } 
예제 #28
0
 internal override void Reset(StagingAreaInputItem input, InputManager inputManager)
 {
     _canceled = false;
     base.Reset(input, inputManager);
 }
예제 #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; 
        }
예제 #30
0
 internal DefaultKeyboardDevice(InputManager inputManager)
     : base(inputManager)
 {
 }
예제 #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) 
        {
        }