This function is used by custom widget implementations; if you're writing an app, you’d use grab_focus to move the focus to a particular widget.
child_focus is called by widgets as the user moves around the window using keyboard shortcuts.
indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward). child_focus
calls the focus vfunc; widgets override this vfunc in order to
implement appropriate focus behavior.
focus vfunc for a widget should return true if moving in
the focus on a focusable location inside that widget, and false if moving in
direction moved the
focus outside the widget. If returning true, widgets normally call
grab_focus to place the focus accordingly; if returning
false, they don’t modify the current focus location.
direction of focus movement
true if focus ended up inside this