# Copyright (c) 2007 SIEGE Development Team
# All rights reserved.
#
# This file is part of libSIEGE.
#
# This software is copyrighted work licensed under the terms of the
# 2-clause BSD license. Please consult the file "license.txt" for
# details.
#
# If you did not recieve the file with this program, please email
# Tim Chas <darkuranium@gmail.com>.

from siege.common cimport *
cimport mouse

def getPosPrev():
    cdef SGint x, y
    sgMouseGetPosPrev(&x, &y)
    return (x, y)
    
def getPosPrevX():
    return sgMouseGetPosPrevX()

def getPosPrevY():
    return sgMouseGetPosPrevY()

def getPos():
    cdef SGint x, y
    sgMouseGetPos(&x, &y)
    return (x, y)

def getPosX():
    return sgMouseGetPosX()
    
def getPosY():
    return sgMouseGetPosY()

def getWheelPrev():
    return sgMouseGetWheelPrev()

def getWheel():
    return sgMouseGetWheel()

cpdef getButtonPrev(SGenum button):
    return bool(sgMouseGetButtonPrev(button))
cpdef getButton(SGenum button):
    return bool(sgMouseGetButton(button))
cpdef getButtonPress(SGenum button):
    return bool(sgMouseGetButtonPress(button))
cpdef getButtonRelease(SGenum button):
    return bool(sgMouseGetButtonRelease(button))

def getButtonLeftPrev():
    return bool(sgMouseGetButtonLeftPrev())
def getButtonLeft():
    return bool(sgMouseGetButtonLeft())
def getButtonLeftPress():
    return bool(sgMouseGetButtonLeftPress())
def getButtonLeftRelease():
    return bool(sgMouseGetButtonLeftRelease())

def getButtonRightPrev():
    return bool(sgMouseGetButtonRightPrev())
def getButtonRight():
    return bool(sgMouseGetButtonRight())
def getButtonRightPress():
    return bool(sgMouseGetButtonRightPress())
def getButtonRightRelease():
    return bool(sgMouseGetButtonRightRelease())

def getButtonMiddlePrev():
    return bool(sgMouseGetButtonMiddlePrev())
def getButtonMiddle():
    return bool(sgMouseGetButtonMiddle())
def getButtonMiddlePress():
    return bool(sgMouseGetButtonMiddlePress())
def getButtonMiddleRelease():
    return bool(sgMouseGetButtonMiddleRelease())
