diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/api/wnd/popexitchecker.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Wasabi/api/wnd/popexitchecker.h')
-rw-r--r-- | Src/Wasabi/api/wnd/popexitchecker.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Src/Wasabi/api/wnd/popexitchecker.h b/Src/Wasabi/api/wnd/popexitchecker.h new file mode 100644 index 00000000..861aa592 --- /dev/null +++ b/Src/Wasabi/api/wnd/popexitchecker.h @@ -0,0 +1,39 @@ +#ifndef __POPUPEXITCHECKER_H +#define __POPUPEXITCHECKER_H + +#include <bfc/depend.h> +#include <bfc/ptrlist.h> + +class ifc_window; +class PopupExitCallback; + +class PopupExitCallbackEntry +{ +public: + PopupExitCallbackEntry(PopupExitCallback *_cb, ifc_window *_watched, api_dependent *_cbd, api_dependent *_wd) : cb(_cb), watched(_watched), cbd(_cbd), wd(_wd) {} + virtual ~PopupExitCallbackEntry() {} + + PopupExitCallback *cb; + ifc_window *watched; + api_dependent *cbd; + api_dependent *wd; +}; + +class PopupExitChecker : public DependentViewerI +{ +public: + PopupExitChecker(); + virtual ~PopupExitChecker(); + + void registerCallback(PopupExitCallback *cb, ifc_window *watched); + void deregisterCallback(PopupExitCallback *cb); +#undef check + int check(ifc_window *w); + void signal(); + int isGrandChildren(ifc_window *parent, ifc_window *child); // recursive + PtrList<PopupExitCallbackEntry> watchers; + + virtual int viewer_onItemDeleted(api_dependent *item); +}; + +#endif |