API addwidget()

@dceejay
Hello any feedback on the PR proposal is welcome.
I don't want to spend time on such dev if there is no chance to be considered/merged.
Thanks