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/auth/Loginbox/popupPasscode.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/auth/Loginbox/popupPasscode.h')
-rw-r--r-- | Src/auth/Loginbox/popupPasscode.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Src/auth/Loginbox/popupPasscode.h b/Src/auth/Loginbox/popupPasscode.h new file mode 100644 index 00000000..7a0b72c5 --- /dev/null +++ b/Src/auth/Loginbox/popupPasscode.h @@ -0,0 +1,65 @@ +#ifndef NULLSOFT_AUTH_LOGINPOPUP_PASSCODE_HEADER +#define NULLSOFT_AUTH_LOGINPOPUP_PASSCODE_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include "./loginPopup.h" + +class LoginData; +class LoginDataCredentials; + + +// notifications +#define NPPN_FIRST (120) + +typedef struct __NPPNRESULT +{ + NMHDR hdr; + INT_PTR exitCode; + LoginData *loginData; +} NPPNRESULT; + +#define NPPN_RESULT (NPPN_FIRST + 0) + + +class LoginPopupPasscode : public LoginPopup +{ +protected: + LoginPopupPasscode(HWND hwnd); + ~LoginPopupPasscode(); + +public: + static HWND CreatePopup(HWND hParent, LoginData *loginData); + +protected: + void UpdateLayout(BOOL fRedraw); + void EndDialog(INT_PTR code); + + BOOL Validate(); + + BOOL OnInitDialog(HWND hFocus, LPARAM param); + void OnCommand(UINT commandId, UINT eventType, HWND hControl); + LRESULT OnNotify(UINT controlId, const NMHDR *pnmh); + HBRUSH OnGetStaticColor(HDC hdc, HWND hControl); + + LRESULT OnEditboxChar(HWND hEdit, UINT ch); + LRESULT OnEditboxKey(HWND hEdit, UINT vKey, UINT flags); + LRESULT OnEditboxPaste(HWND hEdit, LPCWSTR pszText); + + INT_PTR DialogProc(UINT uMsg, WPARAM wParam, LPARAM lParam); + +protected: + LoginDataCredentials *loginData; + LPWSTR message; + UINT messageType; + +private: + friend static HRESULT CALLBACK LoginPopupPasscode_CreateInstance(HWND hwnd, LPARAM param, LoginPopup **instance); +}; + + + + +#endif //NULLSOFT_AUTH_LOGINPOPUP_PASSCODE_HEADER
\ No newline at end of file |