SlideShare a Scribd company logo
Introduction to Application Development  in Python and Gtk+ / Hildon @ Maemo 5 + my very own experience by Amanda Lam Hong Kong Maemo / Moblin / MeeGo User Group
Self Introduction BEng Computer Systems Engineering, University of Warwick, UK Technical Writer of a popular local website company Founder of the Hong Kong Maemo / Moblin / MeeGo User Group @ facebook Executive Committee Member and Podcaster of the Hong Kong PDA User Group (HKPUG) Voluntary News Editor of UMPCFever.com / Digital.XY.HK Author of the first Maemo 4.1 and Maemo 5 Traditional Chinese Language Pack Application Developer of: EeeToggle for Windows eSpeak GUI Client for Maemo 5 Stroke Order Chinese Input Method ( 筆劃輸入法 ) for Maemo 5
Maemo Devices Nokia Internet Tablets: Nokia 770  Maemo 1.x/OS2005 Maemo 2.x/OS2006 Nokia N800 & N810 Maemo 3.x / “Bora” / OS2007 Maemo 4.0 / “Chinook” / OS2008  Maemo 4.1 / “Diablo” / OS2008 Nokia N900 Maemo 5 / “Fremantle” / OS2009 myInteractiveDevice (myID) Maemo 4.x Compatible ZhongYi  眾一  S101 Maemo 4.x Compatible
Maemo’s Application Frameworks Maemo 1.x – 4.x Based on the Gtk+ / Hildon application framework Maemo 5 Based on the Gtk+ / Hildon application framework Support of Qt 4.5 since PR1.0 Support of Qt 4.6 since PR1.2 i.e. ALL existing Maemo devices run Gtk+ and Hildon applications!
So, what is Gtk+? Highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API. Windows Buttons Menus Status Bars Dialog boxes … many other GUI controls Written in C. Provide bindings to other programming languages. Based on 4 libraries: GLib : Low-level stuffs such as data structures, portability wrappers, event loop, threads, dynamic loading and an object system  Pango : layout and rendering of text with an emphasis on internationalization. Cairo : 2D graphics with support for multiple output devices  ATK : set of interfaces providing accessibility
Where did Gtk+ come from? Originated from the  GIMP  (GNU Image Manipulation Program) project by Spencer Kimball and Peter Mattis, started in 1995 Initially, based on Motif… Not good enough! So… Rewrote their own GUI toolkit – Gtk Released since GIMP 0.60 Renamed to Gtk+ since GIMP 0.99
Language Bindings supported by Gtk+ Gtk+ is written in C Bindings  are provided for programmers of other programming languages Official bindings include: C++, Vala, Ruby, Python, Java, .Net, PHP and Perl.
Who use Gtk+? Environments GNOME, Xfce, LXDE… Access Linux Platform (ALP) Moblin / Maemo Applications AbiWord Gnumeric Midori Evolution
Then, what is Hildon? Application framework developed by Nokia Now part of GNOME Was used in Nokia Internet Tablet series and the Ubuntu Mobile and Embedded Edition Depends on Gtk+ (GUI components), GConf (settings) & libcanberra (sound) libraries Application Manager, Control Panel Desktop, Widgets Finger-friendly GUI components for Mobile Devices
Where Hildon sits in the Maemo Architecture?
Hildon 2.2 UI Components
Mixed use of Hildon and Gtk+  UI Components in Maemo Most Hildon classes are inherited from Gtk+ classes You can place both Gtk+ and Hildon UI components to your applications … but, be aware of UI styles and user experience!
What programming languages can I use to develop Maemo applications? C & C++ (GCC 4.2) Python 2.5.4 PHP 5 Ruby 1.8 Java (OpenJDK 1.8.x)
I use Python. But why Python? Because… I am C-phobic! I am just a beginner of Linux application development Python syntax is simple, code is fairly readable Interpreter; easy to debug Can be imperative, object-oriented, or functional Dynamic types Automatic memory management Works well with Gtk+ and Hildon frameworks Many code examples Many existing Maemo applications are developed in Python Code and run directly on my Internet Tablets!
Little History of Since 1989 By  Guido van Rossum , a Dutch computer programmer, now a Google employee Successor to the ABC programming language Vision: an easy and intuitive language just as powerful as major competitors  open source, so anyone can contribute to its development  code that is as understandable as plain English  suitability for everyday tasks, allowing for short development times
Maemo Applications written in Python gPodder Podcast Client Gonvert Hermes Panucci player PyGTKEditor Witter Zoutube
How does Python code look like?
Let’s run the Hello World program!
Class Definition Example
My Maemo Applications Written in Python and Gtk+/Hildon, of course. Support both landscape and portrait mode. UI Internationalization. eSpeak GUI Client Provides a GUI for the eSpeak text-to-speech CLI utility Stroke Order Input Method  筆劃輸入法 As the name suggests!
eSpeakGUI Client: UI Components A set of hildon.PickerButtons in a gtk.HBox A set of hildon.GtkButtons in a gtk.VBox hildon.TextView in a hildon.PannableArea hildon.AppMenu A set of hildon.GtkButtons in a gtk.HBox
eSpeakGUI Client: UI Components hildon.TouchSelector
eSpeakGUI Client: How does it speak? eSpeak is an open-source, command-line Text-to-Speech utility Works like this… espeakcmd = "espeak -v " + currentlang + " -a " + currentAmp + " -p " + currentPitch + " -s " + currentSpeed + " -g " + currentWordGap + " \"" + textresult + "\" &"  os.system(espeakcmd) Available in Maemo Extras Repository The GUI client simply creates a command line to call the espeak utility via the os.system() method. Argument values obtained from Selected values of the hildon.PickerButtons  Text to be spoken from the hildon.TextView
eSpeakGUI Client: Demonstration
Stroke Order Chinese Input Method: UI Components hildon.StackWindow hildon. TouchSelector hildon.TextView in a hildon.PannableArea gtk.Label gtk.Label in hildon.PannableArea hildon.TextView hildon.GtkButtons in HBoxes and VBoxes hildon.GtkButtons in HBoxes and VBoxes hildon.GtkButton hildon.GtkButtons in a VBox hildon.AppMenu hildon.AppMenu
Stroke Order Chinese Input Method: UI Components hildon.AppMenu containing hildon.GtkButtons
Stroke Order Chinese Input Method: The Use of Characters and associated phrases are stored in a SQLite 3 database. Why SQLite 3? Full Unicode Support Native Python API Lightweight, and, FAST! It’s built-in in N900!
Stroke Order Chinese Input Method: Accessing C-compiled libraries directly Not all features are available via bindings You may import the  ctypes  library to get access to methods and properties in C-compiled libraries dynamically. Example: Accessing the N900 Address Book:
Stroke Order Chinese Input Method: Demonstration
Get your hands dirty! Q:  What tools do you need to develop Python applications on the Maemo platform? A:  Python! And… A plain-text editor! Of course, there are other easy-to-use options too.
Glade – Gtk+ RAD tool Drag-and-drop controls to build up a GUI app Not aware of Hildon controls and libraries! Require extra dependency on apps generated
Illumination Software Creator Define variables, GUI components and action blocks visually. Generate Python code for desktop and Maemo. Generate Flex code for Adobe Flash apps. Great app for building a brief prototype and then fine-tune your code later. Available in Microsoft Windows, Mac OS X and various Linux distributions.
PyGtkEditor on Maemo Open, edit, and run Python code directly on your Maemo device! Support syntax highlighting and Hildon text completion. Support other programming languages as well. It itself is written in Python and Gtk+/Hildon!
I decide to develop Maemo apps in Python, do I still need Maemo SDK? You can write Python programs that run on Maemo devices directly, without using the Maemo 5 SDK. Transfer your Python scripts from your PC to your Maemo device. Code directly on your device. Run! However, you need Maemo SDK if you: Want to make use of the device simulator instead of testing your apps on real Maemo device. Would like to package your Python apps. Would like to upload your Python apps to the Maemo.org repositories.
Will my Python/Gtk+/Hildon apps work in MeeGo? Well, maybe. Expect modifications though. MeeGo is based on  Qt  instead of Gtk+/Hildon. From MeeGo.com FAQ: “ Will”. But when? We may get more clues in the forthcoming MeeGo Conference 2010.
MeeGo Architecture
Gtk+ Support in MeeGo Handset UX Zwong tested a Gtk+ app on MeeGo Handset UX and confirmed that it somehow works partially. ( http:// zwong.de/?p =78 )
I want to develop apps for the MeeGo platform – shall I choose Gtk+, or Qt? Of course, the answer is… Qt! Because the entire GUI of MeeGo is based on Qt components. Python binding for Qt is also available:  PyQt Then why shall we still bother with Gtk+? All Maemo devices up to today are based on Gtk+/Hildon. The current release of the Chinese Input Method Engine “MSCIM” on N900 only supports Gtk+/Hildon apps, not Qt’s. GNOME is available in nearly all mainstream Linux distributions. Better to learn both!
References for you to get started Python programming on Maemo http:// wiki.maemo.org/PyMaemo http:// wiki.maemo.org/PyMaemo/UI_tutorial http:// pymaemo.garage.maemo.org / http:// library.gnome.org/devel/pygtk/stable / Hildon and Gtk+ Application Frameworks http://maemo.org/api_refs/5.0/5.0-final/hildon/ http://www.forum.nokia.com/info/sw.nokia.com/id/eb8a68ba-6225-4d84-ba8f-a00e4a05ff6f/Hildon_2_2_UI_Style_Guide.html http://www.forum.nokia.com/info/sw.nokia.com/id/019c2b31-3777-49a0-9257-970d79580756/Hildon_2_2_Widget_UI_Specification.html Source Code of existing Maemo applications http:// maemo.org /packages/
Thank you! Questions are welcome. Please join the  Hong Kong Maemo / Moblin / MeeGo User Group  at  http://groups.to/hkmaemo/ Visit my blog at  http://amanda_hoic.mysinablog.com/
References Pictures and some text of this presentation were obtained from: Gimp.org Gnome.org Gtk.org Maemo.org Meego.com MyID.com.hk Wikipedia.com Zwong.de Zy-mobile.com

More Related Content

What's hot (19)

PPT
Meego presentation
manju2611
 
PDF
Cross platform app a comparative study
ijcsit
 
PDF
Open Source In Mobile - Part I
Cisco Service Provider Mobility
 
PDF
Developers Guide To The Galaxy 8th edition
Marco Tabor
 
PDF
Mobile Developer's Guide To The Galaxy No. 9
Marco Tabor
 
PDF
Mobile app developers guide
Prayukth K V
 
PDF
Mobile technology
Sarankumar Rajagopal
 
PDF
Women's participation in GNOME and other open source communities
Amanda Lam
 
PPT
How to Customize the MeeGo Tablet UX
Gail Frederick
 
PPT
Html5 investigation
oppokui
 
PPT
MeeGo linux os
Rajput Baldev
 
PPT
Android 1
Vikas Sharma
 
PDF
B feigin mobileapplicationdevelopment
sathesh leo
 
PPTX
App development
shubhanshu16
 
PPTX
Smartphone Behavior On A Featurephone Budget
Gail Frederick
 
PDF
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Kai Koenig
 
PDF
Mobile software development_and_mobile_porting
Chandra Shekar Goud Panugulla
 
PDF
The Mobile Market and Qt
Espen Riskedal
 
PPTX
Rao Yeleswarapu - Moblin Overview Apac Roadshow 2009 For Gnome
Mario B.
 
Meego presentation
manju2611
 
Cross platform app a comparative study
ijcsit
 
Open Source In Mobile - Part I
Cisco Service Provider Mobility
 
Developers Guide To The Galaxy 8th edition
Marco Tabor
 
Mobile Developer's Guide To The Galaxy No. 9
Marco Tabor
 
Mobile app developers guide
Prayukth K V
 
Mobile technology
Sarankumar Rajagopal
 
Women's participation in GNOME and other open source communities
Amanda Lam
 
How to Customize the MeeGo Tablet UX
Gail Frederick
 
Html5 investigation
oppokui
 
MeeGo linux os
Rajput Baldev
 
Android 1
Vikas Sharma
 
B feigin mobileapplicationdevelopment
sathesh leo
 
App development
shubhanshu16
 
Smartphone Behavior On A Featurephone Budget
Gail Frederick
 
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Kai Koenig
 
Mobile software development_and_mobile_porting
Chandra Shekar Goud Panugulla
 
The Mobile Market and Qt
Espen Riskedal
 
Rao Yeleswarapu - Moblin Overview Apac Roadshow 2009 For Gnome
Mario B.
 

Viewers also liked (8)

PDF
SqueakGTK
ESUG
 
ODP
Gnome census
Dave Neary
 
PPTX
Introduce gobject introspection
Young-Ho Cha
 
PDF
Multimedia in WebKitGTK+ (FOSDEM 2010)
Igalia
 
PDF
نگاهی به Gtk3
Ali Vakilzade
 
PDF
Gtk development-using-glade-3
caezsar
 
PDF
LCA2013 : Implementing threaded accelerated compositing in WebKitGtk+
Gwang Yoon Hwang
 
PPT
Hibernate architecture
Anurag
 
SqueakGTK
ESUG
 
Gnome census
Dave Neary
 
Introduce gobject introspection
Young-Ho Cha
 
Multimedia in WebKitGTK+ (FOSDEM 2010)
Igalia
 
نگاهی به Gtk3
Ali Vakilzade
 
Gtk development-using-glade-3
caezsar
 
LCA2013 : Implementing threaded accelerated compositing in WebKitGtk+
Gwang Yoon Hwang
 
Hibernate architecture
Anurag
 
Ad

Similar to Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5 (20)

PDF
Hildon 2.2: the Hildon toolkit for Fremantle
Alberto Garcia
 
ODP
PyQt Application Development On Maemo
achipa
 
PDF
5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform
Eduardo Lima
 
ODP
Maemo Development Platform
tko
 
PDF
Opensource Software usability
Giacomo Antonino Fazio
 
PDF
Maemo Harmattan Qt And More
qgil
 
PDF
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Andreas Jakl
 
PDF
Pygtk tutorial
HarikaReddy115
 
PDF
Basics of gtk_ilugc
ilugc
 
PDF
Hands On The New Hildon
Joaquim Rocha
 
PDF
An introduction to Gnome An introdu.pptx
JAYAVARSHINIJR
 
PPT
Qt Application Development on Harmattan
Ville Lavonius
 
PPTX
Intro to gui, cross platform and qt
Muhammad Sabry
 
ODP
Gnome Architecture
동수 장
 
PDF
MeeGo Architecture
Hiroshi Doyu
 
PDF
Python GUI Programming Tkinter and.pdf
AmirKhan811717
 
PPT
Maemo Development Environment
jtukkine
 
PDF
Guy haviv - History of GUI visual design
Guy Haviv
 
PDF
How Android is different from other systems – An exploration of the design de...
IndicThreads
 
PPT
Exploiting Maemo
anidel
 
Hildon 2.2: the Hildon toolkit for Fremantle
Alberto Garcia
 
PyQt Application Development On Maemo
achipa
 
5 Tips and 4 and 1⁄2 Tricks for Porting GNOME Applications to Maemo Platform
Eduardo Lima
 
Maemo Development Platform
tko
 
Opensource Software usability
Giacomo Antonino Fazio
 
Maemo Harmattan Qt And More
qgil
 
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Andreas Jakl
 
Pygtk tutorial
HarikaReddy115
 
Basics of gtk_ilugc
ilugc
 
Hands On The New Hildon
Joaquim Rocha
 
An introduction to Gnome An introdu.pptx
JAYAVARSHINIJR
 
Qt Application Development on Harmattan
Ville Lavonius
 
Intro to gui, cross platform and qt
Muhammad Sabry
 
Gnome Architecture
동수 장
 
MeeGo Architecture
Hiroshi Doyu
 
Python GUI Programming Tkinter and.pdf
AmirKhan811717
 
Maemo Development Environment
jtukkine
 
Guy haviv - History of GUI visual design
Guy Haviv
 
How Android is different from other systems – An exploration of the design de...
IndicThreads
 
Exploiting Maemo
anidel
 
Ad

More from Amanda Lam (10)

PDF
Hong Kong Open Source Conference 2023 - Matter matters! A brief intro to the ...
Amanda Lam
 
PDF
ProductTank HK #31 - Maximizing Product Ops Efficiency with Generative AI
Amanda Lam
 
PDF
Start Building Your Smart Home With Home Assistant
Amanda Lam
 
PDF
World Product Day 2019 / Product Tank HCMC #9: How to advocate product manage...
Amanda Lam
 
PDF
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Amanda Lam
 
PPTX
Crowdfunding lessons learnt from Jolla Tablet & TOHKBD
Amanda Lam
 
PPTX
Exploring the right business strategy for open source mobile platforms
Amanda Lam
 
PPTX
Tacit knowledge sharing in virtual teams: is it even possible?
Amanda Lam
 
ODP
Collaborative product development in F/OSS projects
Amanda Lam
 
PPTX
智能手機與平版電腦系統及開發平台概覽
Amanda Lam
 
Hong Kong Open Source Conference 2023 - Matter matters! A brief intro to the ...
Amanda Lam
 
ProductTank HK #31 - Maximizing Product Ops Efficiency with Generative AI
Amanda Lam
 
Start Building Your Smart Home With Home Assistant
Amanda Lam
 
World Product Day 2019 / Product Tank HCMC #9: How to advocate product manage...
Amanda Lam
 
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Amanda Lam
 
Crowdfunding lessons learnt from Jolla Tablet & TOHKBD
Amanda Lam
 
Exploring the right business strategy for open source mobile platforms
Amanda Lam
 
Tacit knowledge sharing in virtual teams: is it even possible?
Amanda Lam
 
Collaborative product development in F/OSS projects
Amanda Lam
 
智能手機與平版電腦系統及開發平台概覽
Amanda Lam
 

Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5

  • 1. Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5 + my very own experience by Amanda Lam Hong Kong Maemo / Moblin / MeeGo User Group
  • 2. Self Introduction BEng Computer Systems Engineering, University of Warwick, UK Technical Writer of a popular local website company Founder of the Hong Kong Maemo / Moblin / MeeGo User Group @ facebook Executive Committee Member and Podcaster of the Hong Kong PDA User Group (HKPUG) Voluntary News Editor of UMPCFever.com / Digital.XY.HK Author of the first Maemo 4.1 and Maemo 5 Traditional Chinese Language Pack Application Developer of: EeeToggle for Windows eSpeak GUI Client for Maemo 5 Stroke Order Chinese Input Method ( 筆劃輸入法 ) for Maemo 5
  • 3. Maemo Devices Nokia Internet Tablets: Nokia 770 Maemo 1.x/OS2005 Maemo 2.x/OS2006 Nokia N800 & N810 Maemo 3.x / “Bora” / OS2007 Maemo 4.0 / “Chinook” / OS2008 Maemo 4.1 / “Diablo” / OS2008 Nokia N900 Maemo 5 / “Fremantle” / OS2009 myInteractiveDevice (myID) Maemo 4.x Compatible ZhongYi 眾一 S101 Maemo 4.x Compatible
  • 4. Maemo’s Application Frameworks Maemo 1.x – 4.x Based on the Gtk+ / Hildon application framework Maemo 5 Based on the Gtk+ / Hildon application framework Support of Qt 4.5 since PR1.0 Support of Qt 4.6 since PR1.2 i.e. ALL existing Maemo devices run Gtk+ and Hildon applications!
  • 5. So, what is Gtk+? Highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API. Windows Buttons Menus Status Bars Dialog boxes … many other GUI controls Written in C. Provide bindings to other programming languages. Based on 4 libraries: GLib : Low-level stuffs such as data structures, portability wrappers, event loop, threads, dynamic loading and an object system Pango : layout and rendering of text with an emphasis on internationalization. Cairo : 2D graphics with support for multiple output devices ATK : set of interfaces providing accessibility
  • 6. Where did Gtk+ come from? Originated from the GIMP (GNU Image Manipulation Program) project by Spencer Kimball and Peter Mattis, started in 1995 Initially, based on Motif… Not good enough! So… Rewrote their own GUI toolkit – Gtk Released since GIMP 0.60 Renamed to Gtk+ since GIMP 0.99
  • 7. Language Bindings supported by Gtk+ Gtk+ is written in C Bindings are provided for programmers of other programming languages Official bindings include: C++, Vala, Ruby, Python, Java, .Net, PHP and Perl.
  • 8. Who use Gtk+? Environments GNOME, Xfce, LXDE… Access Linux Platform (ALP) Moblin / Maemo Applications AbiWord Gnumeric Midori Evolution
  • 9. Then, what is Hildon? Application framework developed by Nokia Now part of GNOME Was used in Nokia Internet Tablet series and the Ubuntu Mobile and Embedded Edition Depends on Gtk+ (GUI components), GConf (settings) & libcanberra (sound) libraries Application Manager, Control Panel Desktop, Widgets Finger-friendly GUI components for Mobile Devices
  • 10. Where Hildon sits in the Maemo Architecture?
  • 11. Hildon 2.2 UI Components
  • 12. Mixed use of Hildon and Gtk+ UI Components in Maemo Most Hildon classes are inherited from Gtk+ classes You can place both Gtk+ and Hildon UI components to your applications … but, be aware of UI styles and user experience!
  • 13. What programming languages can I use to develop Maemo applications? C & C++ (GCC 4.2) Python 2.5.4 PHP 5 Ruby 1.8 Java (OpenJDK 1.8.x)
  • 14. I use Python. But why Python? Because… I am C-phobic! I am just a beginner of Linux application development Python syntax is simple, code is fairly readable Interpreter; easy to debug Can be imperative, object-oriented, or functional Dynamic types Automatic memory management Works well with Gtk+ and Hildon frameworks Many code examples Many existing Maemo applications are developed in Python Code and run directly on my Internet Tablets!
  • 15. Little History of Since 1989 By Guido van Rossum , a Dutch computer programmer, now a Google employee Successor to the ABC programming language Vision: an easy and intuitive language just as powerful as major competitors open source, so anyone can contribute to its development code that is as understandable as plain English suitability for everyday tasks, allowing for short development times
  • 16. Maemo Applications written in Python gPodder Podcast Client Gonvert Hermes Panucci player PyGTKEditor Witter Zoutube
  • 17. How does Python code look like?
  • 18. Let’s run the Hello World program!
  • 20. My Maemo Applications Written in Python and Gtk+/Hildon, of course. Support both landscape and portrait mode. UI Internationalization. eSpeak GUI Client Provides a GUI for the eSpeak text-to-speech CLI utility Stroke Order Input Method 筆劃輸入法 As the name suggests!
  • 21. eSpeakGUI Client: UI Components A set of hildon.PickerButtons in a gtk.HBox A set of hildon.GtkButtons in a gtk.VBox hildon.TextView in a hildon.PannableArea hildon.AppMenu A set of hildon.GtkButtons in a gtk.HBox
  • 22. eSpeakGUI Client: UI Components hildon.TouchSelector
  • 23. eSpeakGUI Client: How does it speak? eSpeak is an open-source, command-line Text-to-Speech utility Works like this… espeakcmd = "espeak -v " + currentlang + " -a " + currentAmp + " -p " + currentPitch + " -s " + currentSpeed + " -g " + currentWordGap + " \"" + textresult + "\" &" os.system(espeakcmd) Available in Maemo Extras Repository The GUI client simply creates a command line to call the espeak utility via the os.system() method. Argument values obtained from Selected values of the hildon.PickerButtons Text to be spoken from the hildon.TextView
  • 25. Stroke Order Chinese Input Method: UI Components hildon.StackWindow hildon. TouchSelector hildon.TextView in a hildon.PannableArea gtk.Label gtk.Label in hildon.PannableArea hildon.TextView hildon.GtkButtons in HBoxes and VBoxes hildon.GtkButtons in HBoxes and VBoxes hildon.GtkButton hildon.GtkButtons in a VBox hildon.AppMenu hildon.AppMenu
  • 26. Stroke Order Chinese Input Method: UI Components hildon.AppMenu containing hildon.GtkButtons
  • 27. Stroke Order Chinese Input Method: The Use of Characters and associated phrases are stored in a SQLite 3 database. Why SQLite 3? Full Unicode Support Native Python API Lightweight, and, FAST! It’s built-in in N900!
  • 28. Stroke Order Chinese Input Method: Accessing C-compiled libraries directly Not all features are available via bindings You may import the ctypes library to get access to methods and properties in C-compiled libraries dynamically. Example: Accessing the N900 Address Book:
  • 29. Stroke Order Chinese Input Method: Demonstration
  • 30. Get your hands dirty! Q: What tools do you need to develop Python applications on the Maemo platform? A: Python! And… A plain-text editor! Of course, there are other easy-to-use options too.
  • 31. Glade – Gtk+ RAD tool Drag-and-drop controls to build up a GUI app Not aware of Hildon controls and libraries! Require extra dependency on apps generated
  • 32. Illumination Software Creator Define variables, GUI components and action blocks visually. Generate Python code for desktop and Maemo. Generate Flex code for Adobe Flash apps. Great app for building a brief prototype and then fine-tune your code later. Available in Microsoft Windows, Mac OS X and various Linux distributions.
  • 33. PyGtkEditor on Maemo Open, edit, and run Python code directly on your Maemo device! Support syntax highlighting and Hildon text completion. Support other programming languages as well. It itself is written in Python and Gtk+/Hildon!
  • 34. I decide to develop Maemo apps in Python, do I still need Maemo SDK? You can write Python programs that run on Maemo devices directly, without using the Maemo 5 SDK. Transfer your Python scripts from your PC to your Maemo device. Code directly on your device. Run! However, you need Maemo SDK if you: Want to make use of the device simulator instead of testing your apps on real Maemo device. Would like to package your Python apps. Would like to upload your Python apps to the Maemo.org repositories.
  • 35. Will my Python/Gtk+/Hildon apps work in MeeGo? Well, maybe. Expect modifications though. MeeGo is based on Qt instead of Gtk+/Hildon. From MeeGo.com FAQ: “ Will”. But when? We may get more clues in the forthcoming MeeGo Conference 2010.
  • 37. Gtk+ Support in MeeGo Handset UX Zwong tested a Gtk+ app on MeeGo Handset UX and confirmed that it somehow works partially. ( http:// zwong.de/?p =78 )
  • 38. I want to develop apps for the MeeGo platform – shall I choose Gtk+, or Qt? Of course, the answer is… Qt! Because the entire GUI of MeeGo is based on Qt components. Python binding for Qt is also available: PyQt Then why shall we still bother with Gtk+? All Maemo devices up to today are based on Gtk+/Hildon. The current release of the Chinese Input Method Engine “MSCIM” on N900 only supports Gtk+/Hildon apps, not Qt’s. GNOME is available in nearly all mainstream Linux distributions. Better to learn both!
  • 39. References for you to get started Python programming on Maemo http:// wiki.maemo.org/PyMaemo http:// wiki.maemo.org/PyMaemo/UI_tutorial http:// pymaemo.garage.maemo.org / http:// library.gnome.org/devel/pygtk/stable / Hildon and Gtk+ Application Frameworks http://maemo.org/api_refs/5.0/5.0-final/hildon/ http://www.forum.nokia.com/info/sw.nokia.com/id/eb8a68ba-6225-4d84-ba8f-a00e4a05ff6f/Hildon_2_2_UI_Style_Guide.html http://www.forum.nokia.com/info/sw.nokia.com/id/019c2b31-3777-49a0-9257-970d79580756/Hildon_2_2_Widget_UI_Specification.html Source Code of existing Maemo applications http:// maemo.org /packages/
  • 40. Thank you! Questions are welcome. Please join the Hong Kong Maemo / Moblin / MeeGo User Group at http://groups.to/hkmaemo/ Visit my blog at http://amanda_hoic.mysinablog.com/
  • 41. References Pictures and some text of this presentation were obtained from: Gimp.org Gnome.org Gtk.org Maemo.org Meego.com MyID.com.hk Wikipedia.com Zwong.de Zy-mobile.com