Beispiel #1
0
 internal static extern IntPtr SetWinEventHook(
     AccessibleEvents eventMin,              //Specifies the event constant for the
     //lowest event value in the range of events that are
     //handled by the hook function. This parameter can
     //be set to EVENT_MIN to indicate the
     //lowest possible event value.
     AccessibleEvents eventMax,              //Specifies the event constant for the highest event
     //value in the range of events that are handled
     //by the hook function. This parameter can be set
     //to EVENT_MAX to indicate the highest possible
     //event value.
     IntPtr eventHookAssemblyHandle,                 //Handle to the DLL that contains the hook
     //function at lpfnWinEventProc, if the
     //WINEVENT_INCONTEXT flag is specified in the
     //dwFlags parameter. If the hook function is not
     //located in a DLL, or if the WINEVENT_OUTOFCONTEXT
     //flag is specified, this parameter is NULL.
     WinEventProc eventHookHandle,       //Pointer to the event hook function.
     //For more information about this function
     uint processId,                     //Specifies the ID of the process from which the
     //hook function receives events. Specify zero (0)
     //to receive events from all processes on the
     //current desktop.
     uint threadId,                      //Specifies the ID of the thread from which the
     //hook function receives events.
     //If this parameter is zero, the hook function is
     //associated with all existing threads on the
     //current desktop.
     SetWinEventHookParameter parameterFlags             //Flag values that specify the location
     //of the hook function and of the events to be
     //skipped. The following flags are valid:
     );
            public void NotifyClients(AccessibleEvents accEvent, int objectID, int childID)
            {
                if (HandleInternal == IntPtr.Zero || !CanNotifyClients)
                {
                    return;
                }

                Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo,
                                  $"Control.NotifyClients: this = {ToString()}, accEvent = {accEvent}, childID = {childID}");

                User32.NotifyWinEvent((uint)accEvent, new HandleRef(this, HandleInternal), objectID, childID + 1);
            }
Beispiel #3
0
            public void NotifyClients(AccessibleEvents accEvent)
            {
                if (HandleInternal == IntPtr.Zero)
                {
                    return;
                }

                Debug.WriteLineIf(CompModSwitches.MSAA.TraceInfo,
                                  $"Control.NotifyClients: this = {ToString()}, accEvent = {accEvent}, childID = self");

                User32.NotifyWinEvent((uint)accEvent, new HandleRef(this, HandleInternal), User32.OBJID.CLIENT, 0);
            }
Beispiel #4
0
 private void LocationChangedCallback(IntPtr winEventHookHandle,
                                      AccessibleEvents accEvent, IntPtr windowHandle, int objectId,
                                      int childId, uint eventThreadId, uint eventTimeInMilliseconds)
 {
     //Make sure AccessibleEvents equals to LocationChange and the
     //current window is the Target Window.
     if (accEvent == AccessibleEvents.LocationChange && windowHandle.ToInt32() ==
         targetWindow.ToInt32())
     {
         //Queues a method for execution. The method executes when a thread pool
         //thread becomes available.
         ThreadPool.QueueUserWorkItem(new WaitCallback(LocationChangedHelper));
     }
 }
Beispiel #5
0
			public void PublicAccessibilityNotifyClients (AccessibleEvents accEvent, int childID) { base.AccessibilityNotifyClients (accEvent, childID); }
Beispiel #6
0
		protected void AccessibilityNotifyClients (AccessibleEvents accEvent, int objectID, int childID)
		{
			if (accessibility_object != null && accessibility_object is ControlAccessibleObject)
				((ControlAccessibleObject)accessibility_object).NotifyClients (accEvent, objectID, childID);
		}
Beispiel #7
0
 public void NotifyClients(AccessibleEvents accEvent, int childID)
 {
     GridDropDownAccessibilityObject.NotifyWinEvent((int)accEvent, new HandleRef((object)this.DropDownListElement.Popup, this.DropDownListElement.Popup.Handle), -4, childID + 1);
 }
 public void NotifyClients(AccessibleEvents accEvent)
 {
 }
 public void NotifyClients(AccessibleEvents accEvent, int objectID, int childID)
 {
 }
	protected void AccessibilityNotifyClients
		(AccessibleEvents accEvent, int childID)
			{
				// Not used in this implementation.
			}
 internal static extern IntPtr SetWinEventHook(AccessibleEvents eventMin, //Specifies the event constant for the lowest event value in the range of events that are handled by the hook function. This parameter can be set to EVENT_MIN to indicate the lowest possible event value.
                                               AccessibleEvents eventMax, //Specifies the event constant for the highest event value in the range of events that are handled by the hook function. This parameter can be set to EVENT_MAX to indicate the highest possible event value.
                                               IntPtr eventHookAssemblyHandle, //Handle to the DLL that contains the hook function at lpfnWinEventProc, if the WINEVENT_INCONTEXT flag is specified in the dwFlags parameter. If the hook function is not located in a DLL, or if the WINEVENT_OUTOFCONTEXT flag is specified, this parameter is NULL.
                                               WinEventProc eventHookHandle, //Pointer to the event hook function. For more information about this function
                                               uint processId, //Specifies the ID of the process from which the hook function receives events. Specify zero (0) to receive events from all processes on the current desktop.
                                               uint threadId, //Specifies the ID of the thread from which the hook function receives events. If this parameter is zero, the hook function is associated with all existing threads on the current desktop.
                                               SetWinEventHookParameter parameterFlags //Flag values that specify the location of the hook function and of the events to be skipped. The following flags are valid:
     );
 private void LocationChangedCallback(IntPtr winEventHookHandle, AccessibleEvents accEvent, IntPtr windowHandle, int objectId, int childId, uint eventThreadId, uint eventTimeInMilliseconds)
 {
     if (accEvent == AccessibleEvents.LocationChange && windowHandle.ToInt32() == this.skypeWnd.ToInt32())
     {
         ThreadPool.QueueUserWorkItem(new WaitCallback(this.LocationChangedHelper));
     }
 }
 internal static extern IntPtr SetWinEventHook(AccessibleEvents eventMin, AccessibleEvents eventMax, IntPtr eventHookAssemblyHandle, WinEventProc eventHookHandle, uint processId, uint threadId, int parameterFlags);
 internal void AccessibilityNotifyClients(AccessibleEvents accEvent)
 {
     if (this.ParentInternal != null)
     {
         int index = this.ParentInternal.DisplayedItems.IndexOf(this);
         this.ParentInternal.AccessibilityNotifyClients(accEvent, index);
     }
 }
Beispiel #15
0
 /// <summary>
 /// Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control.
 /// </summary>
 /// <param name="accEvent">The AccessibleEvents object to notify the accessibility client applications of. </param>
 /// <param name="childID">The child Control to notify of the accessible event.</param>
 internal void InternalAccessibilityNotifyClients(AccessibleEvents accEvent, int childID)
 {
     this.AccessibilityNotifyClients(accEvent, childID);
 }
 public void NotifyClients(AccessibleEvents accEvent)
 {
 }
Beispiel #17
0
 public static extern IntPtr SetWinEventHook(AccessibleEvents eventMin, AccessibleEvents eventMax, IntPtr eventHookAssemblyHandle, NativeMethods.WinEventProc eventHookHandle, uint processId, uint threadId, NativeMethods.SetWinEventHookParameter parameterFlags);
Beispiel #18
0
 public void PublicAccessibilityNotifyClients(AccessibleEvents accEvent, int childID)
 {
     base.AccessibilityNotifyClients(accEvent, childID);
 }
Beispiel #19
0
		protected void AccessibilityNotifyClients(AccessibleEvents accEvent, int childID) {
			// turns out this method causes handle
			// creation in 1.1.  at first I thought this
			// would be accomplished just by using
			// get_AccessibilityObject, which would route
			// through CreateAccessibilityInstance, which
			// calls CreateControl.  This isn't the case,
			// though (as overriding
			// CreateAccessibilityInstance and adding a
			// CWL shows nothing.  So we fudge it and put
			// a CreateHandle here.


			if (accessibility_object != null && accessibility_object is ControlAccessibleObject)
				((ControlAccessibleObject)accessibility_object).NotifyClients (accEvent, childID);
		}
 public void NotifyClients(AccessibleEvents accEvent, int objectID, int childID)
 {
 }
 private void LocationChangedCallback(IntPtr winEventHookHandle, AccessibleEvents accEvent, IntPtr windowHandle,
                                      int objectId, int childId, uint eventThreadId, uint eventTimeInMilliseconds)
 {
     // TODO: KG - Check Gamewindow is null
     if (accEvent == AccessibleEvents.LocationChange && windowHandle == _settings.GameWindow.Hwnd)
     {
         SetOverlayPosition();
     }
 }