This commit is contained in:
恍兮惚兮 2024-11-20 20:58:36 +08:00
parent 60550d5ee0
commit a678579659

View File

@ -187,11 +187,14 @@ DECLARE_API void *add_WebMessageReceived(void *m_host, void (*callback)(const wc
return NULL; return NULL;
#endif #endif
} }
#ifndef WINXP
struct contextcallbackdatas struct contextcallbackdatas
{ {
EventRegistrationToken contextMenuRequestedToken; EventRegistrationToken contextMenuRequestedToken;
std::wstring label; std::wstring label;
}; };
#endif
// https://learn.microsoft.com/zh-cn/microsoft-edge/webview2/how-to/context-menus?tabs=cpp // https://learn.microsoft.com/zh-cn/microsoft-edge/webview2/how-to/context-menus?tabs=cpp
// https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2_11?view=webview2-1.0.2849.39 // https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2_11?view=webview2-1.0.2849.39
DECLARE_API void *add_ContextMenuRequested(void *m_host, int index, const wchar_t *label, void (*callback)(const wchar_t *)) DECLARE_API void *add_ContextMenuRequested(void *m_host, int index, const wchar_t *label, void (*callback)(const wchar_t *))