comparison dw.h @ 2974:fffb4904c90b

Mac: Initial support for dw_html_javascript_add() and DW_SIGNAL_HTML_MESSAGE for callbacks into native code. Code for iOS next... Then GTK3/4, Windows and Android in that order. Also implemented simple rawhtml tests in the test programs. C++: Added HTML class support for the message callbacks.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 24 Mar 2023 11:39:24 +0000
parents afe9c20294ca
children ae4d6856b983
comparison
equal deleted inserted replaced
2973:ac880987a2c4 2974:fffb4904c90b
106 #define DW_SIGNAL_SWITCH_PAGE "switch-page" 106 #define DW_SIGNAL_SWITCH_PAGE "switch-page"
107 #define DW_SIGNAL_COLUMN_CLICK "click-column" 107 #define DW_SIGNAL_COLUMN_CLICK "click-column"
108 #define DW_SIGNAL_TREE_EXPAND "tree-expand" 108 #define DW_SIGNAL_TREE_EXPAND "tree-expand"
109 #define DW_SIGNAL_HTML_CHANGED "html-changed" 109 #define DW_SIGNAL_HTML_CHANGED "html-changed"
110 #define DW_SIGNAL_HTML_RESULT "html-result" 110 #define DW_SIGNAL_HTML_RESULT "html-result"
111 #define DW_SIGNAL_HTML_MESSAGE "html-message"
111 112
112 /* status of menu items */ 113 /* status of menu items */
113 #define DW_MIS_ENABLED 1 114 #define DW_MIS_ENABLED 1
114 #define DW_MIS_DISABLED (1 << 1) 115 #define DW_MIS_DISABLED (1 << 1)
115 #define DW_MIS_CHECKED (1 << 2) 116 #define DW_MIS_CHECKED (1 << 2)
1657 _DW_EVENT_SWITCH_PAGE, /* Internal message for (notebook) page changed */ 1658 _DW_EVENT_SWITCH_PAGE, /* Internal message for (notebook) page changed */
1658 _DW_EVENT_TREE_EXPAND, /* Internal message for tree (node) expanded */ 1659 _DW_EVENT_TREE_EXPAND, /* Internal message for tree (node) expanded */
1659 _DW_EVENT_COLUMN_CLICK, /* Internal message for (container) column clicked */ 1660 _DW_EVENT_COLUMN_CLICK, /* Internal message for (container) column clicked */
1660 _DW_EVENT_HTML_RESULT, /* Internal message for HTML javascript result */ 1661 _DW_EVENT_HTML_RESULT, /* Internal message for HTML javascript result */
1661 _DW_EVENT_HTML_CHANGED, /* Internal message for HTML status changed */ 1662 _DW_EVENT_HTML_CHANGED, /* Internal message for HTML status changed */
1663 _DW_EVENT_HTML_MESSAGE, /* Internal message for HTML javascript message */
1662 _DW_EVENT_MAX 1664 _DW_EVENT_MAX
1663 } _DW_EVENTS; 1665 } _DW_EVENTS;
1664 #endif 1666 #endif
1665 1667
1666 /* Some dark mode constants for supported platforms */ 1668 /* Some dark mode constants for supported platforms */
2233 int API dw_named_memory_free(HSHM handle, void *ptr); 2235 int API dw_named_memory_free(HSHM handle, void *ptr);
2234 void API dw_html_action(HWND hwnd, int action); 2236 void API dw_html_action(HWND hwnd, int action);
2235 int API dw_html_raw(HWND hwnd, const char *string); 2237 int API dw_html_raw(HWND hwnd, const char *string);
2236 int API dw_html_url(HWND hwnd, const char *url); 2238 int API dw_html_url(HWND hwnd, const char *url);
2237 int API dw_html_javascript_run(HWND hwnd, const char *script, void *scriptdata); 2239 int API dw_html_javascript_run(HWND hwnd, const char *script, void *scriptdata);
2240 int API dw_html_javascript_add(HWND hwnd, const char *name);
2238 HWND API dw_html_new(unsigned long id); 2241 HWND API dw_html_new(unsigned long id);
2239 char * API dw_clipboard_get_text(void); 2242 char * API dw_clipboard_get_text(void);
2240 void API dw_clipboard_set_text(const char *str, int len); 2243 void API dw_clipboard_set_text(const char *str, int len);
2241 HWND API dw_calendar_new(unsigned long id); 2244 HWND API dw_calendar_new(unsigned long id);
2242 void API dw_calendar_set_date(HWND window, unsigned int year, unsigned int month, unsigned int day); 2245 void API dw_calendar_set_date(HWND window, unsigned int year, unsigned int month, unsigned int day);