Source

pygamekit / input.pxd


from prerequisites cimport *
cimport gkmath

cdef enum gkInputState:
    GK_NullState = 0
    GK_Pressed
    GK_Released

cdef enum gkScanCode:
    KC_MAX

cdef extern from "gkInput.h":
    
    cdef cppclass gkKeyboard:
        gkKeyboard()
        clear()
        int key_count
        int keys[]
        unsigned int text
        int key_mod
        
    cdef cppclass gkMouse:
        gkmath.Vector2 getPosition()
        gkmath.Vector2 getRelative()
        bool isButtonDown(int)
        bool mouseMoved()
        clear()
        Real wheelDelta
        int buttons[3]

        
cdef extern from "OgreKit.h":
    
    cdef gkKeyboard *getKeyboard "gkWindowSystem::getSingleton().getKeyboard"()
    cdef gkMouse *getMouse "gkWindowSystem::getSingleton().getMouse"()
    #m_joy      = gkWindowSystem::getSingleton().getJoystick(0);