08.launcher Introduction
08.launcher Introduction
Launcher Kit
Launcher Launcher
Native Factory MRE Factory
Set MRE ID
Launcher Kit
Registration
VMLauncherProvider
+ signalConfigurationCompleted
# onCreateView
# onReleaseView
# onEnter
# onExit
# onSerializeView
# onRestoreView
# onCreateConfiguration
# onBacklightOn
# onBacklightOff
MyLauncher
▪ Helper Function:
– void signalConfigurationCompleted(VMBOOL isSuccess);
• Call this function when configuration is completed or aborted
Widget Kit
Image Image
Gallery Viewer
FM Radio Contact
Shortcut Gadget MRE
Music Player Message
Delegator Delegator Delegator
Widget Kit
: MyLauncher
: VMWidgetKit : VMWallpaperKit
m_widgetID1 : m_widgetID2 :
: Others, such as VMWidgetID VMWidgetID
VMPage,
VMBar,
m_wallpaper :
VMTextFrame,
VMWallpaper
...
m_widget1 : m_widget2 :
VMWidget VMWidget
: MyWallpaper
: MyWidget : MyWidget
: MyLauncher
: VMWidgetKit : VMWallpaperKit
m_widgetID1 : m_widgetID2 :
: Others, such as VMWidgetID VMWidgetID
VMPage,
VMBar,
m_wallpaper :
VMTextFrame,
VMWallpaper
...
m_widget1 : m_widget2 :
VMWidget VMWidget
: MyWallpaper
: MyWidget : MyWidget
– VMUINT32 getAllId(
VMWidgetId **id, // [OUT] Widget ID array
VMUINT32 size, // [IN] Size of the array
VMBaseObject *parentObj) // [IN] Parent of the ID
object
– VMUINT32 getAllId(
IVpiWidgetId **id,
VMUINT32 size,
IVpiObject *parentObj)
• gets the ID of all the supported widgets.
Together, We make the difference.
Widget Kit
– VMBOOL isIdValid(const IVpiWidgetId *id)
• Check if the ID is valid to create a widget
– VMUINT32 getName(
const IVpiWidgetId *id, // [IN] Widget ID
VMWCHAR *string, // [OUT] String buffer
VMUINT32 size) // [IN] Buffer size in wchar
• gets the name of the widgets
– void createIcon(
IVpiFrame **icon, // [OUT] Icon
const IVpiWidgetId *id, // [IN] Widget ID
IVpiObject *parentObj ) // [IN] Parent of the ID object
• Create the widget icon
enum VMWidgetSrcEnum
{
VM_WIDGET_SRC_UNKNOWN,
VM_WIDGET_SRC_APP_SHORTCUT, // Native app
VM_WIDGET_SRC_SYSTEM_DEFAULT, // Native widget
VM_WIDGET_SRC_DOWNLOAD, // MRE widget or Google gadget
VM_WIDGET_SRC_PROPRIETARY // Embedded in this launcher
};
– VMBOOL compareWith(
const IVpiWidgetId *other) const
• Compare if widget ID is the same
– void releaseView()
• Release the widget’s view
– void serializeView()
• Serialize the widget’s view when HS becomes inactive
• Widget can release parts of objects and memory
– void restoreView()
• Restore the widget’s view when HS becomes active
• Widget can re-creates the object and memory
– VMSignal1 <
VMWidget * // [IN] This widget
> m_signalDelete;
• This signal is emitted when the widget wants to be deselected from the
home screen
3D Ripple
Chip set
MRE
Wild world
Delegator
Wallpaper
Wallpaper Native Factory
Set MRE ID MRE Factory
Registration
Wallpaper Kit
VMWallpaperKit VMWallpaper
+ createView
+ createWallpaper + releaseView
+ serializeView
+ restoreView
+ suspend
+ restore
+ setTotalPage
+ doPenInput
: MyLauncher
: VMWidgetKit : VMWallpaperKit
m_widgetID1 : m_widgetID2 :
: Others, such as VMWidgetID VMWidgetID
VMPage,
VMBar,
m_wallpaper :
VMTextFrame,
VMWallpaper
...
m_widget1 : m_widget2 :
VMWidget VMWidget
: MyWallpaper
: MyWidget : MyWidget
– void releaseView()
• Release the wallpaper’s view
– void serializeView()
• Serialize the wallpaper’s view when HS becomes inactive
• Wallpaper can release parts of objects and memory
– void restoreView()
• Restore the wallpaper’s view when HS becomes active
• Wallpaper can re-creates the object and memory
– void resume()
• Resume the wallpaper
Click ‘Main Menu’ to push main menu page Click ‘Home’ to go back to home
m_wallpaper :
: MyLauncher
VMWallpaper
m_histWidgetID :
VMWidgetID
m_widgetID :
m_widgetViewer : VMWidgetID
WidgetViewer
m_widget : VMWidget
m_btnAppBoard :
VMButton
m_appBoard :
AppBoardPage
m_iconMaker :
m_appBoard: iconMaker
AppBoardPage
Icon : AppIcon
m_text : m_image :
VMTextFrame VMImageFrame
m_name :
VMTextFrame
m_btnHome :
VMButton