File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -902,22 +902,18 @@ WEBUI_EXPORT size_t webui_get_child_process_id(size_t window);
902902WEBUI_EXPORT void * webui_win32_get_hwnd (size_t window );
903903
904904/**
905- * @brief Gets the handle to the native window of the specific WebUI implementation
906- * `GtkWindow *` for the Gtk WebView on Linux, HWND for win32.
907- * Won't work with a web browser window on Linux, see also webui_win32_gt_hwnd.
905+ * @brief Get window `HWND`. More reliable with WebView
906+ * than web browser window, as browser PIDs may change on launch.
908907 *
909908 * @param window The window number
910909 *
911- * @return Returns the native window handle (`GtkWindow *` , `hwnd`) as `void*`
910+ * @return Returns the window `hwnd` in Win32 , `GtkWindow` in Linux.
912911 *
913912 * @example
914- * #if __linux__
915- * GtkWindow *w = static_cast<GtkWindow *>(webui_get_native_window_handle_wv(myWindow);
916- * #elif _WIN32
917- * HWND h = webui_get_native_window_handle_wv(myWindow);
918- * #endif
913+ * HWND hwnd = webui_get_hwnd(myWindow); // Win32 (Work with WebView and web browser)
914+ * GtkWindow* window = webui_get_hwnd(myWindow); // Linux (Work with WebView only)
919915 */
920- WEBUI_EXPORT void * webui_get_native_window_handle_wv (size_t window );
916+ WEBUI_EXPORT void * webui_get_hwnd (size_t window );
921917
922918/**
923919 * @brief Get the network port of a running window.
You can’t perform that action at this time.
0 commit comments