Mercurial > foo_out_sdl
diff foosdk/sdk/foobar2000/SDK/modeless_dialog.h @ 1:20d02a178406 default tip
*: check in everything else
yay
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 05 Jan 2026 02:15:46 -0500 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/foosdk/sdk/foobar2000/SDK/modeless_dialog.h Mon Jan 05 02:15:46 2026 -0500 @@ -0,0 +1,20 @@ +#pragma once +#ifdef _WIN32 +//! Service for plugging your nonmodal dialog windows into main app loop to receive IsDialogMessage()-translated messages.\n +//! Note that all methods are valid from main app thread only.\n +//! Usage: call the static methods - modeless_dialog_manager::g_add / modeless_dialog_manager::g_remove. +class NOVTABLE modeless_dialog_manager : public service_base { + FB2K_MAKE_SERVICE_COREAPI(modeless_dialog_manager); +public: + //! Adds specified window to global list of windows to receive IsDialogMessage(). + virtual void add(HWND p_wnd) = 0; + //! Removes specified window from global list of windows to receive IsDialogMessage(). + virtual void remove(HWND p_wnd) = 0; + + //! Static helper; see add(). + static void g_add(HWND p_wnd) {modeless_dialog_manager::get()->add(p_wnd);} + //! Static helper; see remove(). + static void g_remove(HWND p_wnd) {modeless_dialog_manager::get()->remove(p_wnd);} + +}; +#endif
