Added some APIs to the widget class