comparison dwtest.c @ 2093:0c7de37977c8

Add a display of all features in dwtest using dw_debug(). Also update the readme to mention dw_feature_get/set().
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 11 Jun 2020 02:26:42 +0000
parents 524cb235a555
children 8de0a767c0e5
comparison
equal deleted inserted replaced
2092:95b9c7780f3f 2093:0c7de37977c8
1759 free(text); 1759 free(text);
1760 } 1760 }
1761 return FALSE; 1761 return FALSE;
1762 } 1762 }
1763 1763
1764 /* Pretty list of features corresponding to the DWFEATURE enum in dw.h */
1765 char *DWFeatureList[] = {
1766 "Supports the HTML Widget",
1767 "Supports the DW_SIGNAL_HTML_RESULT callback",
1768 "Supports custom window border sizes",
1769 "Supports window frame transparency",
1770 "Supports Dark Mode user interface",
1771 "Supports auto completion in Multi-line Edit boxes",
1772 "Supports word wrapping in Multi-line Edit boxes",
1773 "Supports striped line display in container widgets",
1774 "Supports Multiple Document Interface window frame",
1775 "Supports status text area on notebook/tabbed controls",
1776 "Supports sending system notifications",
1777 NULL };
1778
1764 /* 1779 /*
1765 * Let's demonstrate the functionality of this library. :) 1780 * Let's demonstrate the functionality of this library. :)
1766 */ 1781 */
1767 int main(int argc, char *argv[]) 1782 int main(int argc, char *argv[])
1768 { 1783 {
1775 ULONG notebookpage6; 1790 ULONG notebookpage6;
1776 #endif 1791 #endif
1777 ULONG notebookpage7; 1792 ULONG notebookpage7;
1778 ULONG notebookpage8; 1793 ULONG notebookpage8;
1779 ULONG notebookpage9; 1794 ULONG notebookpage9;
1795 DWFEATURE feat;
1796
1797 /* Test all the features and display the results */
1798 for(feat=0;feat<DW_FEATURE_MAX && DWFeatureList[feat];feat++)
1799 {
1800 int result = dw_feature_get(feat);
1801 char *status = "Unsupported";
1802
1803 if(result == 0)
1804 status = "Disabled";
1805 else if(result > 0)
1806 status = "Enabled";
1807
1808 dw_debug("%s: %s (%d)", DWFeatureList[feat], status, result);
1809 }
1780 1810
1781 /* Initialize the Dynamic Windows engine */ 1811 /* Initialize the Dynamic Windows engine */
1782 dw_init(TRUE, argc, argv); 1812 dw_init(TRUE, argc, argv);
1783 1813
1784 /* Create our window */ 1814 /* Create our window */