AngryLawyer/rust-sdl2 — pull request #209 by reima (2014-11-18 14:31:17+00:00)
Title: Namespaced enums

Rust now has namespaced enums (rust-lang/rust#18973). This PR addresses this by referring to enum variants with their full name (e.g. `QuitEvent` -> `Event::QuitEvent`).

This PR also proposes to drop prefixes and suffixes from the following enum variants:

* `BlendMode`: drop `Blend` prefix
* `ControllerAxis`: drop `Axis` suffix
* `ControllerButton`: drop `Button` suffix
* `Event`: drop `Event` suffix
* `EventType`: drop `EventType` suffix
* `KeyCode`: drop `Key` suffix
* `Mouse`: drop `Mouse` suffix
* `RenderDriverIndex`: drop `Driver` prefix
* `RendererFlip`: drop `Flip` prefix
* `RendererParent`: drop `Parent` suffix
* `ScanCode`: drop `ScanCode` suffix
* `SystemCursor`: drop `Cursor` suffix
* `TextureAccess`: drop `Access` prefix
* `WindowEventId`: drop `WindowEventId` suffix

This eliminates redundancies when referring to enum variants with their full name (e.g. `Event::Quit` instead of `Event::QuitEvent`). I believe that the full names should be preferred, because they underline that the values belong to a common enum through syntax rather than a naming convention.

In addition to that, this PR also replaces enums from `mod ll` with constants. This makes it consistent with the rest of the code base, which doesn't use enums for SDL constants.

Please tell me what you think.