Yet another effort at translating the Win32 API headers

Don Clugston dac at nospam.com.au
Fri Apr 21 09:40:59 PDT 2006


DBloke wrote:
> 
>> The current status is visible from the Wiki web page, and from the 
>> dsource bindings repository. In summary:
> 
> Sorry just seen this page from one of other posts in this thread.
> 
>>
>> * Almost everything included by windows.h has now been converted. The 
>> only exceptions are the rpc stuff, which requires a big chunk of the 
>> COM code to be converted.
> 
> Then this is a massive chunk done, but COM is a dog to work with in any 
> language, so converting this might be challenging to say the least ;)

Actually, Phobos already has the core elements converted, so it's a 
matter of copying them across. I've begun playing around with it, but 
I'm short of time at present.

> 
>> * Some of the macros and bit fields in structs haven't been converted 
>> yet -- but most have.
> 
> Is this due to being complicated or just a lower priority?

The priority was to get a draft of everything so that windows.d would 
compile.
> 
>> * It's not very well tested yet.
> Difficult to test I guess without much to test against a kind of chicken 
> and egg situation

A great help would be a tool that parsed a D file and extracted the 
names of all of the functions. With that, we could make a file that just
consisted of

void main()
{
    auto f1 = &CreateWindowA;
    auto f2 = &MessageBoxA;
    auto f3 = &CreateDialogParamA;
:
:
}

If we had that, we could test that every function declaration in the 
headers actually existed in the implib, which would be a tremendous 
step. (and would be useful for *all* D conversions of C header files!) 
Probably one of the D parsing libraries could do this without much 
trouble -- any volunteers?

> 
>> * I believe that it's very close to being a viable alternative to the 
>> Windows header in Phobos. Almost all of the functions in Phobos are 
>> included.
> 
> Pure D Headers would be useful and a good stead for building a GUI toolkit?
> 
> I take it all the blanks on the wiki are todo?
> Is it just a case of editing wiki where I take a file?

Correct. It's particularly important for Stewart, who hasn't been able 
to get access to the repository. Once a file is in the repository, it's 
fair game for anyone, because it's easy to merge changes in.



More information about the Digitalmars-d-announce mailing list