Yet another effort at translating the Win32 API headers

Don Clugston dac at nospam.com.au
Thu Mar 30 10:42:40 PST 2006


Hi Stewart,
Here's a translation of wingdi, one of the largest headers.
It doesn't yet _fully_ comply with your requirements (although I think 
it's not too bad), but I'm loathe to modify it further without better 
testing. It was a lot of work already to get it to that stage. I think 
we need to get some of the early headers in Windows.h done, so that the 
later ones can compile.

-Don.

Stewart Gordon wrote:
> Don Clugston wrote:
>> Stewart Gordon wrote:
> <snip>
>>> Now, who's going to contribute?
>>
>> I hope that I can do a bit.
> 
> Excellent!
> 
> <snip>
>>> Defining a set of version identifiers for the supported Windows 
>>> versions along the Win9x and WinNT lines is another possibility, but 
>>> it'll take a bit of work to determine how the #ifs should be converted.
>>
>> It's possible to use 'static if', now that it works at module scope.
>>
>> #if (WINVER > 0x4000)
>> #else
>> #endif
>> can become
>> static if (WINVER> 0x4000) {
>> } else {
>> }
>>
>> It's probably abuse of 'static if', but it should work as an interim 
>> solution.
> 
> Where would the user set WINVER?  A module for the user to edit to 
> supply this data might be one possibility, but it would be a nightmare 
> for someone maintaining or even trying to compile several projects that 
> have different OS requirements.  But for as long as it's only an interim 
> solution....
> 
> It would also be nice if the policy for using the versions is clearer 
> than the WINVER/_WIN32_WINDOWS/_WIN32_WINNT stuff is at the moment.  At 
> the moment, I'm puzzled by the number of instances of this
> 
> #if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
> 
> or similar.  It seems to be saying that the function may be used by 
> either an application that supports Win98 or an application that 
> supports Win2000.  So you could have a program that works on Windows 98 
> and Windows NT4 but not Windows 95, or a program that works on Windows 
> 95 and Windows 2000 but not Windows NT4, and whatever is in that #if 
> would be available to either.  Unless I'm misunderstanding, it would 
> appear that the || should be an &&.
> 
> Stewart.
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wingdi.zip
Type: application/x-zip-compressed
Size: 21109 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20060330/2002caae/attachment.bin 


More information about the Digitalmars-d-announce mailing list