Hi,
For GPM: I really don't know anything, you should get familiar with it yourself.
For graphical emulators: There's not much more to it than I've described.
DECSET 9 / 1000 / 1001 / 1002 / 1003 enable/disable reporting mouse coordinates, these are the "\e [ ? number h/l" (as in high/low) sequences. Similarly, 1006 enables/disables the extension. E.g. echo -ne '\e[?1000h\e[?1006h' enables mouse support with the extension.
Without the extension, you receive \e [ M followed by three bytes, encoding the button, x and y coordinates, respectively. Button is 0 for left, 1 for middle, 2 for right, 3 for release of any button, higher numbers for wheel scroll. All values are offset by 32.
With the extension, you receive \e [ < number ; number ; number M/m, numbers are written with ASCII digits and are no longer offset by 32. For mouse release, the button is no longer 3 but instead the actual button, the trailing character being m rather than M denotes that it's a release event.
There is a termcap/terminfo entry for the legacy \e [ M prefix, but not for the new \e [ < prefix. This one should somehow be added there (problem being that \e [ < is not necessarily a prefix for extended mouse only, it can later be used for something else as well, with a trailing character other than m/M), or maybe it could just be hardcode it into ncurses.
You might want to start by examining the patches a few applications received. E.g. here's the one that adds it to midnight commander:
http://www.midnight-commander.org/ticket/2956 , it's a bit more complicated because it also removes support for the older extension 1015, and one that adds it to joe:
http://sourceforge.net/p/joe-editor/patches/108/ . (If you encounter mouse extensions 1005 or 1015 anywhere, forget about them! Go for the 1006 mode.) Similar patches exist for emacs, vim, links/elinks, w3m, probably a few more, you can probably find them in their bugtracker or version control system.