The mouse pointer is represented on the screen by a small
bitmap called the cursor. The
cursor is normally an arrow shape, but it can be changed on
a window-by-window basis. As the pointer moves, it
generates motion events and moves the cursor on the screen
to give the user feedback.
You can query the pointer's location with gdk_window_get_pointer() (Figure 7). This
function requests the X and Y coordinates of the pointer
relative to the window passed as its first argument. It
also requests the currently active modifiers (including
modifier keys and buttons; this field is identical to the
state field in several
events, such as button events). If NULL is passed for the x, y,
or state arguments, that
argument will be ignored.