getting category number

Hi, forks!
Is there any way to get category number at a specific pointer which is
an known coordinate pointer in a raster file? I have (x, y) and try to
find a grass library function that get input (x, y) and return the
category number.
thanks.