# Path: rave/input.py
# class MouseButton(rave.common.IncrementingEnum):
#     """ Common mouse buttons. """
#     LEFT = ()
#     MIDDLE = ()
#     RIGHT = ()
#     SCROLL = ()
#     OTHER = ()


import rave.events
import sdl2
from rave.input import MouseButton

MOUSE_MAPPING = {
    sdl2.SDL_BUTTON_LEFT:   MouseButton.LEFT,
    sdl2.SDL_BUTTON_MIDDLE: MouseButton.MIDDLE,
    sdl2.SDL_BUTTON_RIGHT:  MouseButton.RIGHT
}


def handle_event(ev):
    if ev.type in (sdl2.SDL_MOUSEBUTTONDOWN, sdl2.SDL_MOUSEBUTTONUP):
        sym = ev.button.button

# Path: rave/input.py
# class MouseButton(rave.common.IncrementingEnum):
#     """ Common mouse buttons. """
#     LEFT = ()
#     MIDDLE = ()
#     RIGHT = ()
#     SCROLL = ()
#     OTHER = ()


# Path: modules/sdl2/input/mouse.py
import rave.events
import sdl2
from rave.input import MouseButton


MOUSE_MAPPING = {
    sdl2.SDL_BUTTON_LEFT:   MouseButton.LEFT,
    sdl2.SDL_BUTTON_MIDDLE: MouseButton.MIDDLE,
    sdl2.SDL_BUTTON_RIGHT:  MouseButton.RIGHT
}


def handle_event(ev):
    if ev.type in (sdl2.SDL_MOUSEBUTTONDOWN, sdl2.SDL_MOUSEBUTTONUP):
        sym = ev.button.button

        mapsym = MOUSE_MAPPING.get(sym, MouseButton.OTHER)