changeset 2976:b40adda4a129

OS2/GTK2/Template: Add empty dw_html_javascript_add() functions. OS/2 does not support HTML and GTK2 does not support a WebKit that will allow DW_SIGNAL_HTML_MESSAGE, so implement failure functions.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 24 Mar 2023 17:28:21 +0000
parents ae4d6856b983
children 7d6773c474d0
files gtk/dw.c os2/dw.c os2/dw.def os2/dw.lnk template/dw.c
diffstat 5 files changed, 44 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Fri Mar 24 17:15:59 2023 +0000
+++ b/gtk/dw.c	Fri Mar 24 17:28:21 2023 +0000
@@ -13285,6 +13285,20 @@
 #endif
 
 /*
+ * Install a javascript function with name that can call native code.
+ * Parameters:
+ *       handle: Handle to the HTML window.
+ *       name: Javascript function name.
+ * Notes: A DW_SIGNAL_HTML_MESSAGE event will be raised with scriptdata.
+ * Returns:
+ *       DW_ERROR_NONE (0) on success.
+ */
+int API dw_html_javascript_add(HWND handle, const char *name)
+{
+    return DW_ERROR_UNKNOWN;
+}
+
+/*
  * Create a new Entryfield window (widget) to be packed.
  * Parameters:
  *       text: The default text to be in the entryfield widget.
--- a/os2/dw.c	Fri Mar 24 17:15:59 2023 +0000
+++ b/os2/dw.c	Fri Mar 24 17:28:21 2023 +0000
@@ -12976,6 +12976,20 @@
 }
 
 /*
+ * Install a javascript function with name that can call native code.
+ * Parameters:
+ *       handle: Handle to the HTML window.
+ *       name: Javascript function name.
+ * Notes: A DW_SIGNAL_HTML_MESSAGE event will be raised with scriptdata.
+ * Returns:
+ *       DW_ERROR_NONE (0) on success.
+ */
+int API dw_html_javascript_add(HWND handle, const char *name)
+{
+    return DW_ERROR_UNKNOWN;
+}
+
+/*
  * Create a new HTML window (widget) to be packed.
  * Not available under OS/2, eCS
  * Parameters:
--- a/os2/dw.def	Fri Mar 24 17:15:59 2023 +0000
+++ b/os2/dw.def	Fri Mar 24 17:28:21 2023 +0000
@@ -313,6 +313,7 @@
   dw_html_raw                            @472
   dw_html_url                            @473
   dw_html_javascript_run                 @474
+  dw_html_javascript_add                 @475
 
   dw_calendar_new                        @480
   dw_calendar_set_date                   @481
--- a/os2/dw.lnk	Fri Mar 24 17:15:59 2023 +0000
+++ b/os2/dw.lnk	Fri Mar 24 17:28:21 2023 +0000
@@ -306,6 +306,7 @@
 export dw_html_raw.472
 export dw_html_url.473
 export dw_html_javascript_run.474
+export dw_html_javascript_run.475
 
 export dw_calendar_new.480
 export dw_calendar_set_date.481
--- a/template/dw.c	Fri Mar 24 17:15:59 2023 +0000
+++ b/template/dw.c	Fri Mar 24 17:28:21 2023 +0000
@@ -2396,6 +2396,20 @@
 }
 
 /*
+ * Install a javascript function with name that can call native code.
+ * Parameters:
+ *       handle: Handle to the HTML window.
+ *       name: Javascript function name.
+ * Notes: A DW_SIGNAL_HTML_MESSAGE event will be raised with scriptdata.
+ * Returns:
+ *       DW_ERROR_NONE (0) on success.
+ */
+int API dw_html_javascript_add(HWND handle, const char *name)
+{
+    return DW_ERROR_UNKNOWN;
+}
+
+/*
  * Create a new HTML window (widget) to be packed.
  * Parameters:
  *       id: An ID to be used with dw_window_from_id() or 0L.