Its for the part of the comment that said "but also setting focus on the widget of interest". Grab focus is a top level widget function available to all widgets, but only works on some (as explained in that link).
But I will also caution that grabbing focus is frowned upon by GTK, its something the user can control, so it may not always happen despite a call to this function.