Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Use shorter names for constants, expand exports of constants #24

Merged
merged 2 commits into from
Jan 2, 2014
Merged

Use shorter names for constants, expand exports of constants #24

merged 2 commits into from
Jan 2, 2014

Conversation

timholy
Copy link
Member

@timholy timholy commented Jan 1, 2014

Plus a couple of random fixes

@vtjnash
Copy link
Contributor

vtjnash commented Jan 1, 2014

Do we want to drop the _MASK also?
e.g. GdkEventMask.POINTER_MOTION_HINT instead of GdkEventMask.POINTER_MOTION_HINT_MASK

@timholy
Copy link
Member Author

timholy commented Jan 1, 2014

I wondered about that, too. I'll add that on.

@timholy
Copy link
Member Author

timholy commented Jan 1, 2014

Now I remember why I didn't do this initially. GdkEventMask makes it clear that the constants are used as a mask. In contrast, GdkModifierType doesn't make it clear that the constants are bitmasks, except via the _MASK as part of each constant's name. We could rename the baremodule GdkModifierTypeMask, I suppose. But then it disagrees with the naming in libgdk.

My view is we can still drop the _MASK and not worry about it, but I thought I should mention this concern.

@vtjnash
Copy link
Contributor

vtjnash commented Jan 2, 2014

I guess it didn't seem that important to me to identify that they are a mask. Eventually, (once JuliaLang/julia#2988 merges), I want to type these as Enum and Flag (e.g. Mask) Julia types.

@timholy
Copy link
Member Author

timholy commented Jan 2, 2014

Agreed. Done.

vtjnash added a commit that referenced this pull request Jan 2, 2014
Use shorter names for constants, expand exports of constants
@vtjnash vtjnash merged commit 17b8008 into JuliaGraphics:master Jan 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants