comparison dw.hpp @ 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
comparison
equal deleted inserted replaced
2911:f27fe14eef82 2912:08fcbd5fa069
1562 va_end(args); 1562 va_end(args);
1563 } 1563 }
1564 void Beep(int freq, int dur) { dw_beep(freq, dur); } 1564 void Beep(int freq, int dur) { dw_beep(freq, dur); }
1565 void GetEnvironment(DWEnv *env) { dw_environment_query(env); } 1565 void GetEnvironment(DWEnv *env) { dw_environment_query(env); }
1566 char *GetClipboard() { return dw_clipboard_get_text(); } 1566 char *GetClipboard() { return dw_clipboard_get_text(); }
1567 void SetClipboard(const char *text) { if(text) dw_clipboard_set_text(text, strlen(text)); } 1567 void SetClipboard(const char *text) { if(text) dw_clipboard_set_text(text, (int)strlen(text)); }
1568 void SetClipboard(const char *text, int len) { if(text) dw_clipboard_set_text(text, len); }
1568 void SetDefaultFont(const char *fontname) { dw_font_set_default(fontname); } 1569 void SetDefaultFont(const char *fontname) { dw_font_set_default(fontname); }
1569 unsigned long ColorChoose(unsigned long initial) { return dw_color_choose(initial); } 1570 unsigned long ColorChoose(unsigned long initial) { return dw_color_choose(initial); }
1570 char *FileBrowse(const char *title, const char *defpath, const char *ext, int flags) { return dw_file_browse(title, defpath, ext, flags); } 1571 char *FileBrowse(const char *title, const char *defpath, const char *ext, int flags) { return dw_file_browse(title, defpath, ext, flags); }
1571 char *FontChoose(const char *currfont) { return dw_font_choose(currfont); } 1572 char *FontChoose(const char *currfont) { return dw_font_choose(currfont); }
1572 void Free(void *buff) { dw_free(buff); } 1573 void Free(void *buff) { dw_free(buff); }
1574 int GetFeature(DWFEATURE feature) { return dw_feature_get(feature); }
1575 int SetFeature(DWFEATURE feature, int state) { return dw_feature_set(feature, state); }
1573 }; 1576 };
1574 1577
1575 // Static singleton reference declared outside of the class 1578 // Static singleton reference declared outside of the class
1576 App* App::_app = DW_NULL; 1579 App* App::_app = DW_NULL;
1577 1580