Make widgets.h more C++ friendly