Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#35 exported constants

closed
Robert May
None
1
2006-10-15
2005-10-30
Glenn Linderman
No

Windows Win32 API has voluminous groups of constants
for use with various flags parameters to large numbers
of APIs.

Win32::GUI exports some of these constants, but not
nearly all of them. I think having all of them
available to Windows GUI programs would be useful, but
it would certainly pollute the namespace... but that
seems that a "feature" of using Windows APIs, is having
a polluted namespace. I think that since constant
values are only loaded dynamically when referenced,
that the namespace pollution isn't a serious issue...
although it might be good if the dynamic loader for
constants were made more efficient (binary searching or
hash searching the available list of constants per
recent discussion on the list) if the set of constants
is made significantly larger.

On the other hand, Win32::GUI supports particular
features for some APIs that provide alternatives to the
MS/Windows defined constants. Where use of a
particular constant requires a prerequisite action that
can be taken automatically by Win32::GUI to simplify
the complexity of the Windows interface, such features
add value. Where there is no reduction in complexity,
it seems questionable if converting one flavor of
interface to another is more than busy-work for project
maintainers as the Windows API evolves.

It would seem that the conversion of constants from the
Windows header files to Win32::GUI dynamically loaded
constants could be something that could be automated by
a script of some sort, making new constants
automatically available in the next release of
Win32::GUI after a new release of the Windows SDK.
(Probably the script should look for changed values or
conflicting names to alert GUI project maintainers to
possible compatibility issues when picking up a new SDK.)

Discussion

  • Robert May
    Robert May
    2005-11-14

    Logged In: YES
    user_id=674651

    Following discussion on the hackers list we have an
    implementation that addresses at least some of these issues.
    I hope that we can integrate the solution into the 1.04
    release. When we do that I will split the remaining
    requests in this tracker into new items.

    Rob.

     
  • Robert May
    Robert May
    2005-11-14

    • priority: 5 --> 6
    • assigned_to: nobody --> robertemay
     
  • Robert May
    Robert May
    2006-06-07

    • priority: 6 --> 1
     
  • Robert May
    Robert May
    2006-10-15

    • status: open --> closed