comparison os2/dw.c @ 2127:663467f6eee4

Code cleanup: Add constants to header for dark mode, buffer sizes and Unicode support. Windows and OS/2 can both be built without Unicode support for legacy platforms and apps. Some new Windows features require Unicode (notifications, edge) and Unicode is buggy on OS/2. Can now check if Unicode is supported with the DW_FEATURE_UTF8_UNICODE feature test. Dark mode constants added DW_DARK_MODE_DISABLED/BASIC/FULL/FORCED. Win: Include dw.h in the WinToast glue for the constants, and improve safety in Edge glue.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 28 Jun 2020 20:34:25 +0000
parents 251d050d306b
children a3f105431028
comparison
equal deleted inserted replaced
2126:97839ff3c985 2127:663467f6eee4
13843 */ 13843 */
13844 int API dw_feature_get(DWFEATURE feature) 13844 int API dw_feature_get(DWFEATURE feature)
13845 { 13845 {
13846 switch(feature) 13846 switch(feature)
13847 { 13847 {
13848 #ifdef UNICODE
13849 case DW_FEATURE_UTF8_UNICODE:
13850 #endif
13848 case DW_FEATURE_WINDOW_BORDER: 13851 case DW_FEATURE_WINDOW_BORDER:
13849 case DW_FEATURE_MLE_WORD_WRAP: 13852 case DW_FEATURE_MLE_WORD_WRAP:
13850 case DW_FEATURE_NOTEBOOK_STATUS_TEXT: 13853 case DW_FEATURE_NOTEBOOK_STATUS_TEXT:
13851 case DW_FEATURE_MDI: 13854 case DW_FEATURE_MDI:
13852 return DW_FEATURE_ENABLED; 13855 return DW_FEATURE_ENABLED;
13871 int API dw_feature_set(DWFEATURE feature, int state) 13874 int API dw_feature_set(DWFEATURE feature, int state)
13872 { 13875 {
13873 switch(feature) 13876 switch(feature)
13874 { 13877 {
13875 /* These features are supported but not configurable */ 13878 /* These features are supported but not configurable */
13879 #ifdef UNICODE
13880 case DW_FEATURE_UTF8_UNICODE:
13881 #endif
13876 case DW_FEATURE_WINDOW_BORDER: 13882 case DW_FEATURE_WINDOW_BORDER:
13877 case DW_FEATURE_MLE_WORD_WRAP: 13883 case DW_FEATURE_MLE_WORD_WRAP:
13878 case DW_FEATURE_NOTEBOOK_STATUS_TEXT: 13884 case DW_FEATURE_NOTEBOOK_STATUS_TEXT:
13879 case DW_FEATURE_MDI: 13885 case DW_FEATURE_MDI:
13880 return DW_ERROR_GENERAL; 13886 return DW_ERROR_GENERAL;