MinGW Notification List
mingw****@lists*****
Thu Apr 12 03:54:12 JST 2018
#38187: update wincon.h Open Date: 2018-04-11 10:21 Last Update: 2018-04-11 20:54 URL for this Ticket: https://osdn.net//projects/mingw/ticket/38187 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=38187 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2018-04-11 20:54 Updated by: osdn-mensch Comment: Do you happen to know if Vista is a genuine minimum requirement, in this case? Or, must we just take this on faith? I'd personally just ignore the "minimum version part". I guess you want to surround this by NT version number check, correct? Just checked Win10 SDK - only surrounds CONSOLE_SCREEN_BUFFER_INFOEX by "not phone" (the COMMON_LVB_ attributes are not surrounded and I assume they just don't do anything on Win95/Win2k) Do note that definitions in the form that you suggest, e.g. are fundamentally wrong, because ... People may have defined these themselves - but it is unlikely that this happens before including wincon.h (or windows.h). The code was put in place in an application expecting these values when MINGW is used (this obviously only was tested on mingw-w64 which has them in since a while) and I haven't seen a quick way to distinguish these environments. I'd also say the ifdefs should *not* be included in wincon.h. I note that Microsoft also documents ... which you don't mention. Yes, adding these would be good (the application just didn't used them).WIN10 SDK ships even more: #define COMMON_LVB_LEADING_BYTE 0x0100 // Leading Byte of DBCS #define COMMON_LVB_TRAILING_BYTE 0x0200 // Trailing Byte of DBCS #define COMMON_LVB_GRID_HORIZONTAL 0x0400 // DBCS: Grid attribute: top horizontal. #define COMMON_LVB_GRID_LVERTICAL 0x0800 // DBCS: Grid attribute: left vertical. #define COMMON_LVB_GRID_RVERTICAL 0x1000 // DBCS: Grid attribute: right vertical. #define COMMON_LVB_REVERSE_VIDEO 0x4000 // DBCS: Reverse fore/back ground attribute. #define COMMON_LVB_UNDERSCORE 0x8000 // DBCS: Underscore. #define COMMON_LVB_SBCSDBCS 0x0300 // SBCS or DBCS flag. --------------------------------------------------------------------- Ticket Status: Reporter: osdn-mensch Owner: (None) Type: Feature Request Status: Open Priority: 5 - Medium MileStone: (None) Component: WSL Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: The current one seems very outdated. It misses some older things (I was told that this is around since 2007) like the CONSOLE_SCREEN_BUFFER_INFOEX structure typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX { ULONG cbSize; COORD dwSize; COORD dwCursorPosition; WORD wAttributes; SMALL_RECT srWindow; COORD dwMaximumWindowSize; WORD wPopupAttributes; BOOL bFullscreenSupported; COLORREF ColorTable[16]; } CONSOLE_SCREEN_BUFFER_INFOEX, *PCONSOLE_SCREEN_BUFFER_INFOEX;and the newer COMMON_LVB_ defines for CHAR_INFO structure such as #ifndef COMMON_LVB_GRID_HORIZONTAL #define COMMON_LVB_GRID_HORIZONTAL 0x0400 /* Top horizontal */ #endif #ifndef COMMON_LVB_GRID_LVERTICAL #define COMMON_LVB_GRID_LVERTICAL 0x0800 /* Left vertical */ #endif #ifndef COMMON_LVB_GRID_RVERTICAL #define COMMON_LVB_GRID_RVERTICAL 0x1000 /* Right vertical */ #endif #ifndef COMMON_LVB_REVERSE_VIDEO #define COMMON_LVB_REVERSE_VIDEO 0x4000 /* Reverse foreground and background attribute */ #endif #ifndef COMMON_LVB_UNDERSCORE #define COMMON_LVB_UNDERSCORE 0x8000 /* Underscore */ #endifNote: all these are included in mingw-w64 since some time but I think the original should be updated, too :-) -- Ticket information of MinGW - Minimalist GNU for Windows project MinGW - Minimalist GNU for Windows Project is hosted on OSDN Project URL: https://osdn.net/projects/mingw/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net//projects/mingw/ticket/38187 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=38187