Mercurial > dwindows
comparison win/dw.c @ 2018:663d79f28e46
Win: Fix dw_html_javascript_run() when using embedded IE browser widget.
Switched both the Edge and IE modules to use the main UTF8 conversion utils.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 08 Nov 2019 09:49:16 +0000 |
parents | 686b2d049056 |
children | 0cce5fed4594 |
comparison
equal
deleted
inserted
replaced
2017:686b2d049056 | 2018:663d79f28e46 |
---|---|
5715 int _dw_html_raw(HWND hwnd, char *string); | 5715 int _dw_html_raw(HWND hwnd, char *string); |
5716 int _dw_html_url(HWND hwnd, char *url); | 5716 int _dw_html_url(HWND hwnd, char *url); |
5717 int _dw_html_javascript_run(HWND hwnd, char *script, void *scriptdata); | 5717 int _dw_html_javascript_run(HWND hwnd, char *script, void *scriptdata); |
5718 #ifdef BUILD_EDGE | 5718 #ifdef BUILD_EDGE |
5719 void _dw_edge_action(HWND hwnd, int action); | 5719 void _dw_edge_action(HWND hwnd, int action); |
5720 int _dw_edge_raw(HWND hwnd, LPCWSTR string); | 5720 int _dw_edge_raw(HWND hwnd, char *string); |
5721 int _dw_edge_url(HWND hwnd, LPCWSTR url); | 5721 int _dw_edge_url(HWND hwnd, char *url); |
5722 int _dw_edge_javascript_run(HWND hwnd, LPCWSTR script, void *scriptdata); | 5722 int _dw_edge_javascript_run(HWND hwnd, char *script, void *scriptdata); |
5723 #endif | 5723 #endif |
5724 #endif | 5724 #endif |
5725 | 5725 |
5726 /* | 5726 /* |
5727 * Causes the embedded HTML widget to take action. | 5727 * Causes the embedded HTML widget to take action. |
5753 int API dw_html_raw(HWND handle, char *string) | 5753 int API dw_html_raw(HWND handle, char *string) |
5754 { | 5754 { |
5755 #if (defined(BUILD_DLL) || defined(BUILD_HTML)) | 5755 #if (defined(BUILD_DLL) || defined(BUILD_HTML)) |
5756 #ifdef BUILD_EDGE | 5756 #ifdef BUILD_EDGE |
5757 if (_DW_EDGE_DETECTED) | 5757 if (_DW_EDGE_DETECTED) |
5758 return _dw_edge_raw(handle, UTF8toWide(string)); | 5758 return _dw_edge_raw(handle, string); |
5759 #endif | 5759 #endif |
5760 return _dw_html_raw(handle, string); | 5760 return _dw_html_raw(handle, string); |
5761 #else | 5761 #else |
5762 return DW_ERROR_GENERAL; | 5762 return DW_ERROR_GENERAL; |
5763 #endif | 5763 #endif |
5775 int API dw_html_url(HWND handle, char *url) | 5775 int API dw_html_url(HWND handle, char *url) |
5776 { | 5776 { |
5777 #if (defined(BUILD_DLL) || defined(BUILD_HTML)) | 5777 #if (defined(BUILD_DLL) || defined(BUILD_HTML)) |
5778 #if BUILD_EDGE | 5778 #if BUILD_EDGE |
5779 if (_DW_EDGE_DETECTED) | 5779 if (_DW_EDGE_DETECTED) |
5780 return _dw_edge_url(handle, UTF8toWide(url)); | 5780 return _dw_edge_url(handle, url); |
5781 #endif | 5781 #endif |
5782 return _dw_html_url(handle, url); | 5782 return _dw_html_url(handle, url); |
5783 #else | 5783 #else |
5784 return DW_ERROR_GENERAL; | 5784 return DW_ERROR_GENERAL; |
5785 #endif | 5785 #endif |
5798 int dw_html_javascript_run(HWND handle, char *script, void *scriptdata) | 5798 int dw_html_javascript_run(HWND handle, char *script, void *scriptdata) |
5799 { | 5799 { |
5800 #if (defined(BUILD_DLL) || defined(BUILD_HTML)) | 5800 #if (defined(BUILD_DLL) || defined(BUILD_HTML)) |
5801 #if BUILD_EDGE | 5801 #if BUILD_EDGE |
5802 if (_DW_EDGE_DETECTED) | 5802 if (_DW_EDGE_DETECTED) |
5803 return _dw_edge_javascript_run(handle, UTF8toWide(script), scriptdata); | 5803 return _dw_edge_javascript_run(handle, script, scriptdata); |
5804 #endif | 5804 #endif |
5805 return _dw_html_javascript_run(handle, script, scriptdata); | 5805 return _dw_html_javascript_run(handle, script, scriptdata); |
5806 #else | 5806 #else |
5807 return DW_ERROR_UNKNOWN; | 5807 return DW_ERROR_UNKNOWN; |
5808 #endif | 5808 #endif |