Eventually these identifiers will be sent to the userspace client who created the menu. None of that is hooked up yet though.
I'm going with a global top-of-the-screen menu instead of per-window menus. The basic idea is that menus will live in the WindowServer and clients can create menus via WindowServer requests.