// This file is part of Desktop App Toolkit, // a set of libraries for developing nice desktop applications. // // For license and copyright information please follow this link: // https://github.com/desktop-app/legal/blob/master/LEGAL // #pragma once #include "base/basic_types.h" #include namespace base { enum class EventFilterResult { Continue, Cancel, }; not_null install_event_filter( not_null object, Fn)> filter); not_null install_event_filter( not_null context, not_null object, Fn)> filter); namespace details { class EventFilter : public QObject { public: EventFilter( not_null parent, not_null object, Fn)> filter); protected: bool eventFilter(QObject *watched, QEvent *event); private: Fn)> _filter; }; } // namespace details } // namespace base