I've made some changes following recentish discussion.  The changes are:

- Do away with Windows 9x versioning, given that Windows 9x is no longer supported either by Microsoft or by DMD (implemented).

- a DECLARE_HANDLE template to declare handle types (I think it's fully implemented, please let me know if I've missed any).

- function macros from the C headers are defined as templates, in order to force inlining (partly implemented).

I've realised that some of the changes I've made (such as using @property) mean that the code now doesn't work under D1. What do people think? Can we safely decide that these bindings are going to support D2 only from this point forward? I still have an old D1-compatible version of the bindings, which I'll put on the web in due course for anyone who wants them.

Along these lines, I'm thinking of making a few more changes:

- Just use the D const pointer syntax where we need it, rather than this CPtr template that was made for D1 compatibility.

- Declare all constants as enums, in order to force inlining.

- Define a mixin template along the lines of __AW in newer versions of MinGW, 
so that

    version (Unicode) {
        alias QwertW Qwert;
    } else {
        alias QwertA Qwert;
    }

can become simply

    mixin DECLARE_AW!("Qwert");

Moreover, if we're going to do this, should we place these declarations:
- in a block at/near the end of the file, as we tend to do currently?
- immediately below the declaration of which it declares an alias?
- immediately below for structs, and for function signatures below the whole 
list of them?


What do people think?

I'll be away for a week and a bit starting tomorrow, but will pick up this discussion on my return.

Stewart.

--
My email address is valid but not my primary mailbox and not checked regularly. Please keep replies on the 'group where everybody may benefit.

Reply via email to