Pages

Sunday, October 11, 2009

Debugging Fennec front-end

Fennec is a XUL application, like Firefox based on Mozilla Platform. Therefore, it can be debugged and modified with the Firefox debugging tools you are familiar with.

XUL applications consist of several XUL, JavaScript, and CSS files, which are archived in a Jar file. In the case of Fennec, it has two jar files in fennec/chrome/. en-US.jar which has localization information, chrome.jar which has Fennec front-end code.

To modify them,

1) Extract the chrome.jar in the current path
2) Modify the chrome.manifest as follows
override chrome://global/skin/about.css chrome://browser/skin/about.css
skin browser classic/1.0 content/..
content branding content/branding/
content firstrun content/ contentaccessible=yes
content browser content/
In order to display variable values or simple JavaScript debug message information in the system console, you can use the dump function. Before using this command, it needs to enable browser dump preferences by typing about:config in the URL bar.
browser.dom.window.dump.enabled=true
This is an example of using dump() in the startup() funciton in browser.js

 startup: function() {
    var self = this;

    dump("begin startup\n");

    let container = document.getElementById("tile-container");
   ...

The dump function works well on Linux system, but it doesn't work in Visual Studio in Windows system in order to debug Fennec for Windows Mobile.
It works well in Visual Studio, so I could see debug messages in the output box of Visual Studio using the latest build of Fennec.


References

Thursday, August 27, 2009

How to check a hardware keyboard in Windows Mobile

Windows Mobile keeps a status of hardware keyboard in the registry as follows:

"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Shell\HasKeyboard"

A software keyboard can pop-up if a device doesn't have a hardware keyboard.
However, in the case that the device has a slide-out keyboard, it depends on the status of the slide-out keyboard.

For example:

1) if the keyboard does not slide out, the HasKeyboard value has to be "0"
2) if the keyboard slides out, the HasKeyboard value has to be "1"

However, the above registry value, HasKeyboard, always returns 1 because it doesn't consider the status of slide-out keyboard.

Windows Mobile doesn't provide a standard API for detecting a status of slide-out keyboard, so each device maker uses its own hidden or public API.

For Samsung Windows Mobile devices, Samsung provides Windows Mobile SDK from the Samsung Mobile Innovator site so we can easily get a state of the slide-out keyboard on Samsung devices.

However, HTC doesn't provide any document on how to use device APIs.

As a result, some hackers had tried to find out how to use hidden APIs for using hardware features of HTC devices, but there is no API about slide-out keyboard.

Fennec has a bug with detecting the state of slide-out keyboard.

Actually, this bug seemed easy to solve. At least, it was easy for my i780, but my first patch couldn't support HTC touch pro that has a side-out keyboard.

I tried to check most of the registry values if there is any change. Finally, I found the value from  HKEY_LOCAL_MACHINE\System\GDI\Rotation\Slidekey.

My patch was applied to the mainline of Mozilla and then this cumbersome bug has been fixed.
I am happy to contribute my patch to Mozilla.

Sunday, April 26, 2009

SAMSUNG Windows Mobile SDK 1.0 Released!

SAMSUNG Windows Mobile SDK

Samsung Windows Mobile SDK 1.0 was released!

You can download Samsung Windows Mobile SDK 1.0 from SAMSUNG Mobile Innovator web site, but it needs to be registered for downloading. Of course, it's free.

It consists of API Spec, programming guide, installation guide, header files & library for device APIs, and sample code.

The APIs is used for providing advanced features unique to Samsung phones. You might already have experience using advanced capabilities featured in the Windows Mobile APIs, like GPS, Bluetooth, or multimedia support. In addition to the Microsoft Windows Mobile APIs, you can use Samsung device APIs to access phone features such as the accelerometer, notification LEDs, and haptics feedback.

Fennec team is preparing to support device APIs for Fennec.
Bugzilla Items
Therefore, it would be very helpful to support device APIs exposed to Fennec.

SAMSUNG i780 skin SAMSUNG Omina Skin

In addition, you can download SAMSUNG device emulator skin files from the web site.

The Device Emulator skin archive contains skins for the following phones:
  • SGH-i617 BlackJack II
  • SGH-i907 Epix [and SGH-i780 Mirage] (I own this model)
  • SCH-i760 Robin
  • SCH-i770 Saga
  • SPH-i325 ACE
  • SGH-i900 Omnia [and SCH-i910 Omnia]
Device Emulator skins enable you to change the physical appearance of the Device Emulator in Microsoft Visual Studio. When installed, the Samsung Device Emulator skins will enable you to run the emulator with the appearance of a Samsung phone

Programming Guide of SAMSUNG Windows Mobile SDK

Monday, April 13, 2009

How to make a cab installer of Windows Mobile Fennec build

When you finish building Fennec for Windows Mobile, you can ask "How can I install Fennec on my Windows Mobile handset?"

"Where is the installer?"

Fennec build system creates only a zip file in the path of "objdir/mobile/dist".

You might install Fennec using this zip file. But, it is cumbersome. Fortunately, the Fennnec team has released Fennec for Windows Mobile as a cab install.

"How can they make a cab installer?"

If you want to make a cab installer, move to /objdir/mobile/mobile/installer.
And then, run Makefile as follows,

$make installer

If so, you can find a cab installer in the path of "objdir/mobile/dist".

Friday, March 27, 2009

Fennec is running on SAMSUNG i780

Doug Turner solved the test blocker of Fennec for Windows Mobile.

I was delight to hear the new because I had tried several times to run Fennec on my SAMSUNG i780 (called Mirage in Korea). I had failed to run Fennec.

Fennec1.0 alpha for Windows Mobile

Fennec1.0 alpha for Windows Mobile


Tooday, I tried to build Fennec for Windows Mobile from the trunk of Mozilla.
It is working well, but very slow on i780.

I found several problems as follows,
- Multiple instances
- Long start-up time
- IME button not disappeared
- Broken Hangul(Korean)

I will file up these problems on the Bugzilla and try to fix them.

Thursday, February 19, 2009

Supporting Hildon Menu for Fennec

I implemented the hildon menu for Fennec on Maemo.

Actually, the hildon menu feature has not been decided to be added for 1.0 release.
I'm not sure if this patch could be applied to the mainline.

Mozilla platform already supports the hildon framework so it is easy to add new things for Maemo if you wish.



Monday, February 09, 2009

Mozilla@FOSDEM2009

FOSDEM 2009 finished last week. Although I didn't attend FODSEM, I got a feel for what was going through through blogs and photos on Flikr. FODSEM(Free and Open Source Software Developer’s European Meeting) is a largest occasion for free/open source developers in Europe. It is relevant to various open source projects and it can be compared with OSCON(O’Reilly Open Source Convention) held in the US.


The following projects had their own session:


KDE, GNOME, Mozilla, X.org, Fedora+CentOS, OpenSUSE, BSD+PostgreSQL, GNUStep, Jabber, Debian, Ada, Free Java, OpenOffice, Drupal, Ruby & Rails, MySQL, Linux Kernel
In addition, there were other projects sessions such as OpenMoko, Maemo, CMake, Webkit, Xfce, and OLPC.
In particular, there were Mozilla related sessions as follows:

  • Mozilla Europe
  • Mozilla Foundation
  • Mozilla and Universities
  • What’s after Firefox 3.1
  • Community Sites Project
  • Building XUL communities
  • SeaMonky
  • Overview of Mozilla QA
  • Oni
  • Rising to the Sun(bird)
  • Thunderbird3
  • Prism
  • Fennec
  • Embedding
  • Mozilla headless back-end
  • Events/EduCamp@FOSDEMa2009

Photo: Teemu Mäntynen( An old woman wears a Firefox t-shirts. it's lovely)
For your information, you can find session videos of FOSDEM. They have not open 2009 videos, you can find session videos of the 2008,2007

I hope to attend FOSDEM next year.
References

Sunday, January 11, 2009

Hildon related bugzilla issues

Fennec1.0 alpha3 preview
426291 -- Add support for Hildon (Maemo) application menu
426292 -- Add support for Hildon (Maemo) filepicker
426293 -- Add support for Hildon (Maemo) banner for alerts
426299 -- Create a theme for Hildon (Maemo) platform [tracking bug]

There are several bugs of Fennec about Hildon integration as you can see the above list, but the Fennec team has not cared about theses bugs, because they seems to strive to implement the UI features and Windows Mobile port for XULRunner. Therefore, the platform specific features still have not been implemented, even for the Maemo platform.

Anyway, Hildon menu integration seems to be simple to implement for me.

Can I try??