 setBelowmouse wp = withRef wp setBelowmouse'
 {# fun Fl_pushed as pushed'
        {  } -> `Ptr ()' #}
-pushed :: IO (Maybe (Ref Widget))
+pushed :: IO (Maybe (Ref WidgetBase))
 pushed = pushed' >>= toMaybeRef
 {# fun Fl_set_pushed as setPushed'
        { id `Ptr ()' } -> `()' supressWarningAboutRes #}
 setPushed :: (Parent a WidgetBase) => Ref a -> IO ()
 setPushed wp = withRef wp setPushed'
 {# fun Fl_focus as focus' {  } -> `Ptr ()' #}
-focus :: IO (Maybe (Ref Widget))
+focus :: IO (Maybe (Ref WidgetBase))
 focus = focus' >>= toMaybeRef
 {# fun Fl_set_focus as setFocus'
        { id `Ptr ()' } -> `()' supressWarningAboutRes #}
 setFocus :: (Parent a WidgetBase) => Ref a -> IO ()
 setFocus wp = withRef wp setFocus'
 {# fun Fl_selection_owner as selectionOwner' {  } -> `Ptr ()' #}
-selectionOwner :: IO (Maybe (Ref Widget))
+selectionOwner :: IO (Maybe (Ref WidgetBase))
 selectionOwner = selectionOwner' >>= toMaybeRef
 {# fun Fl_set_selection_owner as setSelection_Owner'
        { id `Ptr ()' } -> `()' supressWarningAboutRes #}

                   else throw e)
    Nothing -> return ()
  where
    allToplevelWindows :: [Ref Window] -> Maybe (Ref Window) -> IO [Ref Window]
    allToplevelWindows ws (Just w) = nextWindow w >>= allToplevelWindows (w:ws)
    allToplevelWindows ws Nothing = return ws

       { `Int' } -> `()' #}

{# fun Fl_readqueue as readqueue' {  } -> `Ptr ()' #}
readqueue :: IO (Maybe (Ref WidgetBase))
readqueue = readqueue' >>= toMaybeRef
{# fun Fl_add_timeout as addTimeout'
       { `Double', id `FunPtr CallbackPrim' } -> `()' supressWarningAboutRes #}
