Glenn Linderman wrote:
On approximately 11/9/2005 1:26 PM, came the following characters from
the keyboard of Robert May:
Please find attached what I hope is a final beta of a
Win32::GUI::Constants package - v0.00_03.
Constants.PL contains stuff like:
BDR_OUTER 0x0003 # (BDR_RAISEDOUTER | BDR_SUNKENOUTER)
BDR_INNER 0x000C # (BDR_RAISEDINNER | BDR_SUNKENINNER)
BDR_RAISED 0x0005 # (BDR_RAISEDOUTER | BDR_RAISEDINNER)
Perhaps it would be a nice addition to the TODO file to "enhance
Constants.PL to interpret constant C expressions expressed in terms of
previously defined constants within the Constants.PL file". In the
fullness of time, then, cutting and pasting would be easier from the
header files.
An encompassing TODO addition would be to change the syntax for the
__DATA__ section to be the subset of C that includes comments, and
#define. That would make the cutting and pasting even easier!
Of course, that leads in to the also missing TODO of parsing the Windows
header files themselves, looking only for #define that consist only of
constant numbers and expression syntax and already seen constant
operands, which would also be encompassing! These are items that I
could be interested in whacking at, if I ever complete my long-delayed
top-priority project. But listing them might inspire someone else to
beat me to it, which would be OK too.
I'll add something to the TODO file about making it easier to extract
the constant definitions, but the though of writing a C-preprocessor
(even a partial one) just for this one job doesn't appeal to me much - I
haven't tried CPAN to see what's available off the shelf though. From
what I've read h2xs may have some functionality, but I couldn't get the
header parsing functionality to work on windows - perhaps I should give
it another go in a cygwin environment.
I guess you can tell that I'm quite happy with the functionality, since
I can only think of long-term TODO items :)
I'll count that as a thumbs-up. I'll try to find time to package it all
up properly this weekend.
Regards,
Rob.