I'm developing a custom memory viewer in Python for IDA. Obviously I need to know current EA. For now, I just ask user to supply it through AskAddr()
and it works fine. However, I'd like my plugin to integrate with IDA better. For example, if I click on a function in the functions window, or click anything in the navigator, it should open my window (if it's focused already), not the hex view or disassembly view. Well, at least I'd expect it to. I don't believe opening these is hardcoded in IDA's internals, since we can get as many hex/disassembly views as we want, and IDA always uses the last one as EA handler... so they are probably registering themselves somehow.
What I've tried was to use UI hooks, but they simply do not register the desired events. If I click on the navigator, it shows nothing, but if I press G, it correctly receives JumpAsk
event. So it seems to work on a whim. The other thing I've tried was to use simplecustviewer_t
that offers OnCursorPosChanged
, but apparently it handles changing position of a text caret in a window, not EA "cursor" changes.
Is there any way I can hook up into these kind of events?