void DestroyMarkedWindowNotifications() { if(KWMFocus.MarkedObserver.Ref && KWMFocus.MarkedObserver.AppRef) { AXLibStopObserver(&KWMFocus.MarkedObserver); AXLibRemoveObserverNotificationOLD(&KWMFocus.MarkedObserver, kAXWindowMiniaturizedNotification); AXLibRemoveObserverNotificationOLD(&KWMFocus.MarkedObserver, kAXWindowMovedNotification); AXLibRemoveObserverNotificationOLD(&KWMFocus.MarkedObserver, kAXWindowResizedNotification); AXLibRemoveObserverNotificationOLD(&KWMFocus.MarkedObserver, kAXUIElementDestroyedNotification); AXLibDestroyObserver(&KWMFocus.MarkedObserver); } }
internal void AXLibRemoveApplicationObserver(ax_application *Application) { if(Application->Observer.Valid) { AXLibStopObserver(&Application->Observer); for(int Notification = AXApplication_Notification_WindowCreated; Notification < AXApplication_Notification_Count; ++Notification) { AXLibRemoveObserverNotification(&Application->Observer, Application->Ref, AXNotificationFromEnum(Notification)); } AXLibDestroyObserver(&Application->Observer); } }