Mercurial > dwindows
comparison dw.h @ 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 | 42f8ad7a89e8 |
comparison
equal
deleted
inserted
replaced
2126:97839ff3c985 | 2127:663467f6eee4 |
---|---|
1329 | 1329 |
1330 #if defined(__OS2__) || (defined(__WIN32__) && !defined(GDK_WINDOWING_WIN32)) || (defined(WINNT) && !defined(GDK_WINDOWING_WIN32)) || defined(__EMX__) | 1330 #if defined(__OS2__) || (defined(__WIN32__) && !defined(GDK_WINDOWING_WIN32)) || (defined(WINNT) && !defined(GDK_WINDOWING_WIN32)) || defined(__EMX__) |
1331 typedef unsigned long DWTID; | 1331 typedef unsigned long DWTID; |
1332 #endif | 1332 #endif |
1333 | 1333 |
1334 /* Some dark mode constants for supported platforms */ | |
1335 #define DW_DARK_MODE_DISABLED 0 | |
1336 #define DW_DARK_MODE_BASIC 1 | |
1337 #define DW_DARK_MODE_FULL 2 | |
1338 #define DW_DARK_MODE_FORCED 3 | |
1339 | |
1340 /* Application ID support lengths */ | |
1341 #define _DW_APP_ID_SIZE 100 | |
1342 | |
1334 /* Use at least the linux utsname limit to avoid gcc fortify warnings */ | 1343 /* Use at least the linux utsname limit to avoid gcc fortify warnings */ |
1335 #define _DW_ENV_STRING_SIZE 65 | 1344 #define _DW_ENV_STRING_SIZE 65 |
1336 | 1345 |
1337 typedef struct _dwenv { | 1346 typedef struct _dwenv { |
1338 /* Operating System Name and DW Build Date/Time */ | 1347 /* Operating System Name and DW Build Date/Time */ |
1483 DW_FEATURE_MLE_WORD_WRAP, /* Supports word wrapping in Multi-line Edit boxes */ | 1492 DW_FEATURE_MLE_WORD_WRAP, /* Supports word wrapping in Multi-line Edit boxes */ |
1484 DW_FEATURE_CONTAINER_STRIPE, /* Supports striped line display in container widgets */ | 1493 DW_FEATURE_CONTAINER_STRIPE, /* Supports striped line display in container widgets */ |
1485 DW_FEATURE_MDI, /* Supports Multiple Document Interface window frame */ | 1494 DW_FEATURE_MDI, /* Supports Multiple Document Interface window frame */ |
1486 DW_FEATURE_NOTEBOOK_STATUS_TEXT, /* Supports status text area on notebook/tabbed controls */ | 1495 DW_FEATURE_NOTEBOOK_STATUS_TEXT, /* Supports status text area on notebook/tabbed controls */ |
1487 DW_FEATURE_NOTIFICATION, /* Supports sending system notifications */ | 1496 DW_FEATURE_NOTIFICATION, /* Supports sending system notifications */ |
1497 DW_FEATURE_UTF8_UNICODE, /* Supports UTF8 encoded Unicode text */ | |
1488 DW_FEATURE_MAX | 1498 DW_FEATURE_MAX |
1489 } DWFEATURE; | 1499 } DWFEATURE; |
1490 | 1500 |
1491 /* Macro for casting resource IDs to HICN */ | 1501 /* Macro for casting resource IDs to HICN */ |
1492 #define DW_RESOURCE(a) (a < 65536 ? (HICN)a : (HICN)0) | 1502 #define DW_RESOURCE(a) (a < 65536 ? (HICN)a : (HICN)0) |