#NEWLINE# def _get_mouse_position( self , ev ) : #NEWLINE# #INDENT# position = HIPoint ( ) #NEWLINE# carbon . GetEventParameter ( ev , kEventParamMouseLocation , typeHIPoint , c_void_p ( ) , sizeof ( position ) , c_void_p ( ) , byref ( position ) ) #NEWLINE# bounds = Rect ( ) #NEWLINE# carbon . GetWindowBounds ( self . _window , kWindowContentRgn , byref ( bounds ) ) #NEWLINE# return ( int ( ( ( position . x - bounds . left ) - self . _view_x ) ) , int ( ( ( position . y - bounds . top ) - self . _view_y ) ) )