changeset 2912:08fcbd5fa069

C++: Fix a warning and implement a few features in App.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 27 Dec 2022 09:43:53 +0000
parents f27fe14eef82
children 6981feb6210b
files dw.hpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dw.hpp	Tue Dec 27 09:00:02 2022 +0000
+++ b/dw.hpp	Tue Dec 27 09:43:53 2022 +0000
@@ -1564,12 +1564,15 @@
     void Beep(int freq, int dur) { dw_beep(freq, dur); }
     void GetEnvironment(DWEnv *env) { dw_environment_query(env); }
     char *GetClipboard() { return dw_clipboard_get_text(); }
-    void SetClipboard(const char *text) { if(text) dw_clipboard_set_text(text, strlen(text)); }
+    void SetClipboard(const char *text) { if(text) dw_clipboard_set_text(text, (int)strlen(text)); }
+    void SetClipboard(const char *text, int len) { if(text) dw_clipboard_set_text(text, len); }
     void SetDefaultFont(const char *fontname) { dw_font_set_default(fontname); }
     unsigned long ColorChoose(unsigned long initial) { return dw_color_choose(initial); }
     char *FileBrowse(const char *title, const char *defpath, const char *ext, int flags) { return dw_file_browse(title, defpath, ext, flags); }
     char *FontChoose(const char *currfont) { return dw_font_choose(currfont); }
     void Free(void *buff) { dw_free(buff); }
+    int GetFeature(DWFEATURE feature) { return dw_feature_get(feature); }
+    int SetFeature(DWFEATURE feature, int state) { return dw_feature_set(feature, state); }
 };
 
 // Static singleton reference declared outside of the class