Better describe what you really intend, not what you do. I have no idea why someone may want to query focus for a widget. For your task, maybe Gtk.Widget.get_state_flags would help, I played with that function myself recently. But maybe what you desire is just connecting to a signal?
Generally we connect to the “activate” or the “changed” signal for a GtkEntry. “activate” is emitted, when the user pressed RETURN or another meta key, changed is emited for every keystroke. Most of the time “activate” is what we want – if the user is done with his input, we get the new string. I can not tell you how you connect to signals in gtkmm, I have used only C, Python, Ruby, Nim. But you should find that in the gtkmm tutorials, or just ask here again.