Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Widget Provider

Copyright © MediaTek Inc. All rights reserved.


Outline

▪ Class Diagram
▪ Basic Class
▪ Hello World Explanation

Together, We make the difference.


Widget Provider Class Diagram
.\src\app\widget\vm_widget_provider.h

VMWidgetProvider

# onCreateView
# onReleaseView

MyWidget

Together, We make the difference.


Widget Provider
▪ The base class of MRE widget is VMWidgetProvider
▪ Virtual Function:
– virtual void onCreateView()
• Notify app to create widget’s view
• When the widget is selected to put on the desktop, onCreateView is called
• When MS boots up and HS starts to load widgets, onCreateView is called

– virtual void onReleaseView()


• Notify app to release widget’s view
• When the widget is deleted, onReleaseView is called
• To avoid from memory leak, we assert if any object isn’t released after
onReleaseView

Together, We make the difference.


Widget Provider – Hello World

▪ Hello World Explanation

: MyWidget

m_text : VMTextFrame

Together, We make the difference.


www.mediatek.com

Copyright © MediaTek Inc. All rights reserved.

You might also like