Browse Source

Add WebViewDestroy class for usage in std::shared_ptr/unique_ptr

Signed-off-by: falkTX <falktx@falktx.com>
pull/498/head
falkTX 1 month ago
parent
commit
57747bf94e
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      distrho/extra/WebViewImpl.hpp

+ 9
- 0
distrho/extra/WebViewImpl.hpp View File

@@ -125,3 +125,12 @@ void webViewReload(WebViewHandle webview);
void webViewResize(WebViewHandle webview, uint width, uint height, double scaleFactor);

// --------------------------------------------------------------------------------------------------------------------

/**
Helper class for usage in std::shared_ptr and std::unique_ptr.
*/
struct WebViewDestroy {
void operator()(WebViewHandle handle) { webViewDestroy(handle); }
};

// --------------------------------------------------------------------------------------------------------------------

Loading…
Cancel
Save