Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose...

57
Moblin Application Development Introduction Introduction MMAE Team MMAE Team Developer Relations Division (DRD) Software and Services Group (SSG), Intel

Transcript of Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose...

Page 1: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Moblin Application DevelopmentIntroductionIntroduction

MMAE TeamMMAE TeamDeveloper Relations Division (DRD)

Software and Services Group (SSG), Intel

Page 2: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Agenda

• Moblin V2 Application Framework

• Development Environment Setup

• App Development TechnologiesApp Development Technologies

2

Page 3: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Moblin V2 Application Frameworkpp

3

Page 4: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Moblin2.0 Architecture OverviewMoblin2.0 Architecture Overview Sob 0 c tectu e O e eob 0 c tectu e O e e‘Legacy’ UI(QT/GTK)

Clutter UI(preferred)

Moblin UI

Media

Browser

PIM

UI Shell

Mail

Utils

Settings

WM + Compositor

PlatformSpecific U

es

Clutter ToolkitClutter Toolkit

p

m UI

GTK+ ClutterQT

COGL

UI

Service

Mobli

GStreamer GTK / QT

Cairo

OpenGLPangoGlib

pp vices

n FoundaGObject CairoWeb Svcs

PIM Server

Sync

GStreamer/Helix Power Ext

DRM

Telephony•Call MgrSMS i

D‐BusPwr Policy GUPnP

AServ ations

GeoClue

Dev Mgmt

HTML Renderer BlueZ ConnManX

DRM

Trusted Boot

•SMS engine•Modem abstraction

Linux Kernel & Drivers

4

Page 5: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Component Overviews

• Clutter

• Multimedia Framework

• PulseAudio

• GeoClue

• GTK+

• D-BUS

• Qt

5

Page 6: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Clutter Overview

Clutter is an open source software library for creating sleek, fast and i ll i h i t f ith 3D ff t d i ti d visually rich interfaces with 3D effects and animations, and new,

intuitive, touch-screen paradigms

• Uses OpenGL without exposing the complexityp p g p y

• Offers a simple, object-oriented API, tailored toward manipulating 2D objects in 3D space and time

B ilt GNOME t h l i lib bj t • Built on GNOME technologies - glib, gobject, pango

• Developed in C with bindings for Python, Perl, C#

• Released under the GNU LGPL licenseReleased under the GNU LGPL license

6

Page 7: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Demo

7

Page 8: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Clutter Architecture

Clutter Application

Clutter Toolkit

Clutter Application

GTK/Qt

COGL

Box2D Gstreamer Webkit

COGL

GLib Pango Cairo OpenGL/ESg p /

8

Page 9: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Clutter Key Features (1)

Supports manipulation of a scene graph of 2D multimedia layers in 3D space

Image Support

• Wide image format support including SVG, PNG, JPEG etc.

• Easily extended to importand integrate other image formats and pixel data y p g g psources.

Text Rendering

• Full UTF8 Anti Aliased text rendering using custom Pango based rendererFull UTF8 Anti Aliased text rendering using custom Pango based renderer

• Rich layout support, high quality scaling, support for markup with font styles, color and weights

Animation/Special effectsAnimation/Special effects

• Rich implicit animation building blocks

• Easily combined and extended

• Built in affects for fades, paths, wipes

• Limitless possibilities with Shader and FBO support for blurs etc.

9

Page 10: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Clutter Key Features (2)

Scriptable layout and animation file support

Web Rendering

• Integration with the Webkit web browser engine (Mozilla integration planned)planned)

• Provides advanced browsing experience with kinetic panning, real time content zooms, software keyboard and form support

• Extensible and configurable

Physics

• Integration with Box2D physics engine

Media playback

• Integration with Gstreamer (Helix integration planned)

10

Page 11: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

GTK+ Overview

• a library for creating GUI– LGPL– Multiple platform including Linux/Unix/Windows/– Object-oriented architecture in C– Provides rich user experience– Hide the low level detail. Hide the low level detail.

• WidgetsB i id t lik b tt h k b d t t t i– Basic widgets like button, check box and text entries

– Powerful MVC API like tree views, multi-line text field – Numerous APIs for convenient uses like file chooser

and font selection

• Widgets in GTK+ are placed on windows using a box-packing model

– specify only how to pack widgets together in container boxes, rather than position them directly

11

Page 12: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Low level GTK+ Libraries

• GLib– A general-purpose utility library, not specific to graphical user interfaces– Some replacements for standard call like g_malloc and additional helper

functions for handling linked lists, strings and etc– Type system to form the foundation for GTK’s class hierarchy – Signal system which is used throughout GTK+ – A thread API which abstracts the different native thread APIs of the

various platforms

• GDK– It provides drawing and window system facilities on X11, Windows, and It provides drawing and window system facilities on X11, Windows, and

the Linux framebuffer device.– Use GDK for low-level access to the underlying windowing system,

including low-level access to events, windows, and the clipboard– Don’t use it to render images. Uses Cairo.

12

Page 13: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Low level GTK+ Libraries(2)

• Cairo– 2D graphics library with support for multiple output devices– Features sophisticated API for drawing vector graphics, compositing

images – It provides operations similar to the drawing operators of PostScript and It provides operations similar to the drawing operators of PostScript and

PDF– Uses cairo to draw graphics in your application beyond the widgets

provided by GTK+.

• Pango– A library for layout and rendering of text y y g– Core of text and font handling for GTK+-2.0. Engine fo

GtkTextView, GtkLabel, GtkEntry and other widgets that display text.

– Emphasize internationalized text handling.

13

Page 14: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Media Overview

Helix and GStreamer

Hardware Acceleration enabled for bothHardware Acceleration enabled for both

• Video Acceleration via LibVA for Menlow and Moorestown devices

• Audio Acceleration via Low Power Audio driver on Moorestown devices

• Codec bundles available from RealNetworks and Fluendo

S t f Cl tt b d b t ti l (Cl tt M di )Support for a Clutter based abstraction layer (ClutterMedia)

• Simple media interface that covers for 80% of the media applicationspp

• More advanced applications will need to drop into the MMF level

• Support for Helix and GStreamer

14

Page 15: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Media Architecture Using GStreamerMedia Architecture Using GStreamered a c tectu e Us g GSt ea eed a c tectu e Us g GSt ea e

Cl tt

Application

ClutterClutterMedia

GStreamer

SRC * Video Decoder * Texture Sink

GStreamer

* Audio Decoder * PA Sink

demuxer

Audio Decoder PA Sink

XServer PulseAudio

Linux Kernel & Drivers

15

Page 16: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Media Architecture Using HelixMedia Architecture Using Helixed a c tectu e Us g eed a c tectu e Us g e

Cl tt

Application

ClutterClutterMedia

HXClientKit Interface ClutterSiteVideo Renderer

Helix Client DNA

HXClientKit Interface

Codec

PulseAudioSiteAudio Renderer

Helix

XServer PulseAudio

Codec

Linux Kernel & Drivers

16

Page 17: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Pulseaudio

• PulseAudio is a sound server for POSIX and Win32 systems.

• A networked sound server, similar in theory to the Enlightened Sound Daemon (EsounD).

• Features• Features– Software mixing of multiple audio streams, bypassing any restrictions the

hardware has. – Network transparency, allowing an application to play back or record audio p y, g pp p y

on a different machine than the one it is running on. – Sound API abstraction, alleviating the need for multiple backends in

applications to handle the wide diversity of sound systems out there. Generic hardware abstraction giving the possibility of doing things like – Generic hardware abstraction, giving the possibility of doing things like individual volumes per application.

• Support for low power audio playback on Moorestown devices

• Library licensed under LGPL and server daemon under GPL

17

Page 18: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

PulseAudio Diagram

18

Page 19: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

GeoClue

Geoclue is a modular geoinformation service built on top of the D-Busi t messaging system.

The goal of the Geoclue project is to make creating location-aware applications as simple as possible. applications as simple as possible.

Geoclue is Free Software, licensed under GNU LGPL.

It is developed for Linux but should be portable to any platform that It is developed for Linux, but should be portable to any platform that uses D-Bus.

In Moblin2 Compliance Spec: v0.11.1

19

Page 20: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Main features of Geoclue

• Standardized D-Bus (and GObject) interfaces to various geographical d t data sources

• Easy and fast to implement: Need to get data from provider XYZ? Chances are, Geoclue is the easiest way to do that... Chances are, Geoclue is the easiest way to do that...

• Geoclue Master provider (experimental at the moment) makes things eaven easier: you don't even have to choose a data provider, j t l t G l h th b t ibl id f just let Geoclue choose the best possible provider for you.

• Adding new providers (data sources) is straight-forward: Even when the geoinformation source you want is not already in Geoclue, the geoinformation source you want is not already in Geoclue, Implementing a Geoclue provider may well turn out to be the easiest way forward.

20

Page 21: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

GeoClue Diagram

Client Application

D-BUS

C API

pp

D BUS

GeoClue Daemon

Provider Interface Master Provider

IP Wifi CellGypsy IPLocation

WifiLocation

CellLocation ……

21

Page 22: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

D-Bus Overview

• Inter-process communication mechanism on same host– Fast and lightweight

A hit t l• Architecture layers– A library, libdbus, a general one-to-one message passing framework– A message bus daemon executable, built on libdbus, that multiple

applications can connect to. A router to dispatch message.pp p g– Wrapper libraries or bindings based on particular application frameworks

• Basic concepts– System bus is a system wide daemon for events like USB is inserted into y y

system– Session bus is a per-user login daemon for general IPC demands between

apps

• Moblin uses D Bus as the primary IPC mechanism for • Moblin uses D-Bus as the primary IPC mechanism for applications.

22

Page 23: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

D-Bus Usage in the Moblin Application

• Launching applicationWhen registering an application to D-Bus service, the framework can allow applications to launch only once, running a single instance of an application is

d f f ll b l d l d kg g

an optimized feature for small mobile devices. It is also used to make sure the application survives the task killing process.

• System notificationThe Moblin application can connect and listen to system events, like hardware state and device mode changes, and proceed accordingly.

• Separating applications, user interfaces, and engines p g pp , , gIt's easier to use D-Bus to separate applications, user interfaces, and engines. Then the engine can be used easily from different applications.

23

Page 24: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

D-BUS Service Addressing Mechanism

• The "address" of a remote call has four parts.– well-known service name– path of the object that implements the remote method

i t f – interface name– function (method) name.

• All four components are needed to address a remote method method.

24

Page 25: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Qt

Qt is a cross-platform application development framework, widely used f th d l t f GUI d l d f d l i for the development of GUI programs, and also used for developing non-GUI programs such as console tools and servers.

Qt uses C++ with several non-standard extensions implemented by an Qt uses C++ with several non standard extensions implemented by an additional pre-processor that generates standard C++ code before compilation. Qt can also be used in several other programming languages; via language bindings. g g ; g g g

Non-GUI features include SQL database access, XML parsing, thread management, network support and a unified cross-platform API for file handlinghandling.

Distributed under the terms of the GNU LGPL (among others), Qt is free and open source software.p

25

Page 26: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Qt Features

•Intuitive C++ class library

•Portability across desktop and embedded operating systems

•Integrated development tools with cross-platform IDE – Qt Creator cross-platform IDE – Qt libraries – Qt Linguist translation & internationalization tools

•High runtime performance and small footprint on embedded

26

Page 27: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Qt License

• Commercial Version– For development of proprietary and/or commercial software with Qt where

d t t t h dyou do not want to share any source code.– For regular desktop applications, there are no royalties, runtime licenses,

or other additional costs. – For fixed systems or devices where the main functionality relies on Qt, a

i di ib i li l runtime distribution license may apply. – The license is sold on a per-developer basis and assigned to an individual.

Qt licenses may be transferred, but only every six months and within the same organization.

• LGPL– Only can be used in Qt V4.5 and later version– Support services are available separately for purchase 12 months Qt pp p y p Q

Standard Support $1970

• GPL– Support services are available separately for purchase 12 months Qt

Standard Support $1970

27

Page 28: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Development Environment Setupp p

28

Page 29: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Development Environment

• 2 ways to setup a development environment

• Develop on your Linux workstation with an occasional remote validation and debugging task on a target device.

• Develop within a Moblin v2 environment using one of the following: a KVM image, a VMWare image, or on a platform such as a netbook.

29

Page 30: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Comparison of the 2 ways

Developing on Linux workstation Developing in Moblin v2 environment (KVM, VMWare, or netbook)

BenefitsBenefits•Familiar desktop, configuration, network setup, etc. •Standard development tools and environment

•A Moblin compliant distribution. No need to update libraries. •Application runs in actual target environmentenvironment

•Running on powerful workstation environment. •(On target device) Have platform-specific features and drivers.

Drawbacks•Must align (install or update) devel packages with Moblin v2 libraries.

•Slower performance •Must install necessary tools p g

•UI experience is different than mobile device •May not have platform-specific

biliti ( h t h

y•Smaller screen area for debugging •Netbook keyboard/mouse small or awkward

capabilities (such as touch screen, telephony stack, etc)

30

Page 31: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Moblin Image Creator 2 Introduction

• Moblin Image Creator 2 (MIC2) is a tool for creating and i l ti M bli i manipulating Moblin images.

• MIC2 is a series of utilities. – moblin-image-creator for image creation moblin image creator for image creation – moblin-image-converter for image transformation – moblin-chroot for generating chroot environment from image and vice

vera vera

• MIC2 is NOT based on MIC 1.0.

31

Page 32: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Moblin Image Creator 2 (cont.)

• Supports major Linux distributions and can be used on at least the f ll i di t ib tifollowing distributions

– Fedora (Fedora 9 and above) – Opensuse (> OpenSUSE 10.3) – Ubuntu (Ubuntu 8.10. MIC2 is not supported on Ubuntu 8.04 due to

incompatible yum versions)

• Supports various types of images: Supports various types of images: – Live CD – Live USB – Loop images Loop images – KVM images – VMDK (Vmware)

32

Page 33: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

MIC2 Installation Prerequisites

• The following packages MUST be installed before MIC2 installation:– Yum, rpm, kpartx, kparted, syslinux, isomd5sum, kvm, zlib-devel, python-

devel

• Specific packages for Fedora and Moblin:Specific packages for Fedora and Moblin:– Pykickstart, device-mapper

• Specific packages for Ubuntu 8.10:– python-celementtree, python-elementtree, dmsetup

• Modules should be loaded– Squashfs dm snapshot loop Squashfs, dm_snapshot, loop

33

Page 34: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

MIC2 Installation

2 ways: From binary or From source

• From binary1. Check http://repo.moblin.org/moblin/tools and download binary

packages(.deb or .rpm)packages(.deb or .rpm)2. Install ☺

• From source1. Check http://repo.moblin.org/moblin/tools, download and unzip source

codesori l i // i bli / bli i 2git clone git://git.moblin.org/moblin-image-creator-2

2. cd moblin-image-creator-2make cleanmakemakesudo make install

34

Page 35: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Using moblin-image-creator2

sudo moblin-image-creator --config=netbook-core.ks --format=livecd --cache=mycache

35

Page 36: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Kickstart Configuration

• Configuration of images is based on kickstart, the format used for tt d d i t ll ti i F d d R dh tunattended installation in Fedora and Redhat.

• 2 existing kickstart configurations so far in MIC2– netbook-core ks – Target imagenetbook core.ks Target image– netbook-core-developer.ks – For development

• User can customize the image by modifying the kickstart file.

36

Page 37: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Using moblin-chroot

• Two major usage models – One-shot image post processing

sudo moblin-chroot -c livecd moblin-netbook-core-200903131337.iso

– Multiple times changes

sudo moblin-chroot -s chroot-fs-2 --unpack-onlysudo moblin-chroot -s chroot-fs-2 --unpack-onlymoblin-netbook-core-200903131337.iso

sudo moblin-chroot chroot-fs-2

sudo moblin-chroot -c livecd --convert-only chroot-fs

37

Page 38: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Using moblin-image-convertor

• This utility is used to transform a virtual machine image (KVM or VMDK) t li i VMDK) to a live image.

sudo moblin image convertor srcimg InputImage dstformat Targegformat sudo moblin-image-convertor --srcimg=InputImage --dstformat=Targegformat

38

Page 39: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Application Development Toolspp p

39

Page 40: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Supported Programming Languages

• C/C++

• Python

• Adobe* Flash*

• Adobe* AIR*

• Mozilla* App

• Widget Solution

40

Page 41: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Development Tools

• MIC2

• PowerTOP– A Linux tool that helps you find the programs that are misbehaving while

your computer is idle, and provides tuning suggestions to achieve low your computer is idle, and provides tuning suggestions to achieve low power consumption.

• Linux Project Generator

• Anjuta DevStudio– An IDE which is easy to install and use and may be preferred over emacs

or vi for those used to developing with graphical interfaces.

• Eclipse– Another very popular IDE

41

Page 42: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Linux Project Generator

• Linux Project Generator is a tool that can be used to quickly generate t b d M bli li t t l t j t i C C an autogen-based, Moblin compliant template project in C, C++, or

Python.

• It has a growing set of sample code that can be selected and It has a growing set of sample code that can be selected and included.

42

Page 43: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

LPG Feature List

Feature Description

autogen enabledProject can be built and installed with standard 3 commands: autogen.sh, make, (sudo) make install.

Customize project data User enters name, path, language, license, etc.C, C++, Python Select which language you want your template project to be written in.P j t t S l t if t j t t t li ti lib bi tiProject type: app, lib, or combo

Select if you want your project to generate an application, a library, or any combination (such as two app binaries and a library).

Dependent Libraries Select the libraries to include. Uses pkg-config to generate appropriate build flags.(Moblin) Compliance

Check whether to only display Moblin compliant libraries and versions to include as dependencies.Pick from the most common open source licenses. Appropriate COPYING and code headers are generated. Supports GPL 2, GLP 2+, GPL 3, LGPL 2.1,

Licenseand code headers are generated. Supports GPL 2, GLP 2+, GPL 3, LGPL 2.1, LPGL 3, MIT, and BSD. New or custom licenses can be easily added.

gtk-docCheck whether your library should auto-generate documentation from gtk-doc style comments.

I18N Ch k h th t dd t d l f i t ti li tiI18N Check whether to add support and examples for internationalization.

Sample CodeSelect the samples you want included in your template. Ideally most tutorials and 'how-to' documentation also include a block of code that can be built into a template project.

i S f d li d

43

automation Supports most features as command-lined parameters.

Page 44: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Widget Overview

What is Widget

• A small plug-in which is usually shown as a small window or a dialog box

Sh h b d k b l h• Show on the web, desktop or mobile phone

• A small stuff which is attractive and easy to use

• Usually Plugged with HTML, Javascript, Flash or iframe

• Different widgets show different source (web service) in one page

Utility of widget

• Offer richer dynamic effect on the web or desktop• Offer richer dynamic effect on the web or desktop

• Provide a service to other websites, and extend the brands and user groups by using virus-like sales mode

• Offer services for SNS users and gain more users fast• Offer services for SNS users and gain more users fast

44

Page 45: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Moblin widget flash demo

45

Page 46: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

The widget stack of the Product is built on Moblin OSMoblin OS

46

Page 47: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Features overview (1)

# Feature Description

1 Widget Standard

Widget based on W3C specification, and Compliance with Sohu/Apple/Nokia mobile widget

2 Plug-in Support Plug-ins, such as Flash player.g pp g , p y

3 Ajax Support Provide API for sending and receiving data by means of Ajax.

4 UI •Floating effect4 UI •Floating effect

•Borderless

•Irregularly shape

•Translucent window•Translucent window

5 Event support

The widgets can communicate with each other by event

47

Page 48: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Features overview (2)

# Feature Description

6 SDK Standard framework, open to the third party

7 Widget manage

•Read Widget information from configuration file and register into Application Manager after downloading Widgetmanage Manager after downloading Widget

•Delete Widget information from Application Manager.

8 Widget •Special container to hold various kinds of widget applications8 Widget Desktop

•Special container to hold various kinds of widget applications

•Different widget applications can be shown in full-screen or floating mode on the desktop

9 Local •Widget app can read and write local file9 Local Resource Access API

•Widget app can read and write local file

•Camera control and get info

•Network status notification (TBD)

•GPS control and get info (TBD)•GPS control and get info (TBD)

48

Page 49: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

New experimentalE t t i t t k +A StEntertainment stack +Apps Store

Apps StoreODM: BYD(BiYaDi)OSV: Moblin OSVPl tf M l R f h

WidgetsISVISV DevelopersPlatform: Menlow Refresh

TTM: Q2’09Entertainment stack ready by early Q109Widget engine ready by early Q209•Neusoft provides apps dev tools &

SDK •Host apps submission &

Authorization (SI)

•Sohu porting its UWA widgets to Moblin/MID

•Host widget submission & authorization

Widget engine ready by early Q209Online app store ready by Q209Apps store owner: SohuWidget engine owner: Neusoft

Moblin OS Moblin OS About Neusoft and Sohu: Neusoft is the largest offshore software outsourcing service provider in China. Sohu.com is No.2 portal website in PRC

BYD HWswebsite in PRC.

49

Page 50: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Moblin/MID Widget SDK

Sign NDA and get SDK from Neusoft before it is public

d l lBased on Java eclipse as a plug-in

Running on Windows OS (Linux version is in plan, but not available)

Features:• Develop guidance and help document which is integrated in Eclipse• Create default project (default files)• Coding language edit (has symbol highlight function)Cod g a guage ed ( as sy bo g g u c o )• Debug with MID simulator• Build widget package

50

Page 51: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Summary

51

Page 52: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Q & AQ & A

52

Page 53: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Thanks!Thanks!

53

Page 54: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

BACKUP

54

Page 55: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

BKM of keeping application UI style consistent in different OEM customized OSconsistent in different OEM customized OS

• Design a set of GTK theme for application.

• Load the theme by gtk_rc_parse()

• Minor source code modification

• Can change UI style with no touch on source code

55

Page 56: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

API References

56

LibrariesLibraries FreetypeFreetypeGTKGTK HW/SW (de)codecHW/SW (de)codec

XML2XML2FontsFonts

WebkitWebkit

PNG/JPEGPNG/JPEG

Core LibrariesCore Libraries

GStreamerGStreamer liblib

XrenderXrender CairoCairo

OpenGLOpenGL

2D Gfx2D Gfx

Page 57: Moblin Application Development Introduction level GTK+ Libraries • GLib – A general-purpose utility library, not specific to graphical user interfaces – Some replacements for

Moblin Application Template

What is prerequisites (including headers and libraries):

• X11

• Cairo

• OpenGL (usually via Mesa)

• Glib

• Clutter• Clutter

• Standard Linux development tools (gdb, gcc, autoconf, and so on)

• Source code management utilities, including: subversion, git Source code management utilities, including: subversion, git

You can obtain the latest project template from Moblin.org

57