About LunaCE

From WebOS-Ports
Jump to: navigation, search

Introduction

HP released the webOS 3.0.5 LunaSysMgr component to open source back in late June 2012 and worked with WebOS Internals to put together the WebOS Ports team to guide development of the webOS Community Edition project (WOCE).

LunaCE is are the modifications that have been done to the code of LunaSysMgr that HP released. It adds the following features:

Features

Feature/Fix Version Table

Feature/Fix Description Committer Available from version
Feature App Switching Gestures EricBlade 4.0.0
Feature Slide Gestures ShiftyAxel 4.0.0
Feature Status Bar Slide Trigger ShiftyAxel 4.0.0
Feature Lower Minimum Brightness ShiftyAxel 4.0.0
Feature Status Bar Search Icon ShiftyAxel 4.0.0
Feature Status Bar Version String ShiftyAxel 4.0.0
Fix PIN Check pc-world 4.0.0
Fix lunaAnimations code cleanup ShiftyAxel 4.0.0
Fix Doxygen Documentation tyrok 4.0.0
Fix Eliminated drag snap in Card View ShiftyAxel 4.0.0
Fix Catch gestures on screen border ShiftyAxel 4.0.0
Fix Relative width calculation for Just Type bar ShiftyAxel 4.0.0
Fix Relative calculation for Quicklaunch layout ShiftyAxel 4.0.0
Feature Infinite Card Cycling dukiedrew 4.1.0
Feature Card Stack Tabs dukiedrew 4.1.0
Feature Maximize Edge Cards sandgorgon 4.1.0
Fix Text Field Blanking ShiftyAxel 4.2.0
Feature lunaAnimations Update ShiftyAxel 4.3.1
Feature Fluid Gestures ShiftyAxel 4.3.1
Fix Keyboard Mode Switching ShiftyAxel 4.3.5
Feature Dynamic Dashboard Height API ShiftyAxel 4.4.0
Fix Multi-Letter Keys mansandersson 4.4.1
Feature Additional Keyboard Layouts mansandersson 4.5.0
Fix PalmSystem Encryption pc-world 4.5.0
Feature Custom Carrier String garrett92c 4.6.0
Feature Stack Spread Gestures ShiftyAxel 4.7.0
Feature Mini Cards ShiftyAxel 4.7.5
Feature Card Zoom Gestures ShiftyAxel 4.8.0
Feature Wave Launcher ??? 4.9.0

Feature Description

Wave Launcher

The Wave Launcher is back from webOS 2.x.

Activate it with an upwards slide on the left or right hand size of the screen:

Wave Gesture









Mini Cards

The Mini Cards are back from webOS 1.x

Activate by tapping on the wallpaper while in card view:

Mini Cards









Card Zoom Gestures

The Mini Card zoom factor can be set manually with a pinch-to-zoom gesture whilst in card view:

Zoom Gesture









Stack Spread Gestures

Stacks can be spread with a two-finger gesture whilst in card view:

Spread Gesture









Infinite Card Cycling

You can now scroll off the end of card view and cycle back around to the other side:

Infinite Cards Out
Infinite Cards In
















Tap-to-Maximize Edge Cards

You can now maximize the left/right onscreen cards whilst in card view:

Tap on an edge card
and it Maximizes
















Fluid Gestures

Cards will animate smoothly under the user's finger during the app switch and minimize gestures when using this mode:

Fluid Sideswipe
Fluid Upswipe
















Device Name as Carrier Text/Custom Carrier String

You can now specify your own carrier string, or use the Device Name from Device Info:

Custom Carrier String






Virtual Trackball

The Virtual Keyboard now has a trackball for moving the cursor, which can also select text if Shift is held down.

Virtual Trackball









Keyboard Shortcuts

LunaCE introduces new keyboard shortcuts for it's features using the meta key (Win/Cmd/Card):

Meta + Up: Minimize current card, show launcher while minimized.

Meta + Down: Maximize current card.

Meta + Left/Right: Switch between open cards.

Meta + Tab: Cycle through cards, activate Tabbed Cards if enabled.

Feature Freeze

As of LunaCE 4.9.5 we are doing a 'feature freeze' until we have a stable release. We will be working on fixing bugs and stabilizing LunaCE.

New Branch Layout

The LunaCE Github branch layout and it's relation to Preware is being updated. The new layout is as follows:

alpha - Used for development of new features, the alpha package in Preware will be updated on a per-commit basis for testing.

beta - Used for bugfixing of new features added to alpha, the beta Preware package will be updated on a per-tag basis for testing stable release candidates.

When the current beta branch is ready for release to the stable feeds, the Preware package will be updated manually from the latest commit.

Pull Requests

Any pull requests for new features need to be against the alpha branch, fixes should be against the beta branch.


Preferences Support

Introduction

This page will guide you through plugging your luna modification into Tweaks, for the purpose of exposing parameters and/or function toggles to the user.

NOTE: Requires Tweaks 3.0.0 or higher.

Adding a Preference to Luna

The first thing required to plug a modification into Tweaks is a variable to store a setting in.

Modifications may have more than one setting, but if your modification is a feature then it is strongly suggested that it has at least one- the ability to turn it off.

Creating the Variable

Your variable should first be added to Src/base/settings/Preferences.h. Recommended practice is to declare a private m_something variable and provide a public interface to it.

Example Preferences.h Diff:

@@ -60,6 +60,7 @@ class Preferences : public QObject

	bool sysUiNoHomeButtonMode() const { return m_sysUiNoHomeButtonMode; }
	bool sysUiEnableNextPrevGestures() const { return m_sysUiEnableNextPrevGestures; }
+	int myPreferencesVariable() const { return m_myPreferencesVariable; }

	bool imeEnabled() const { return m_imeEnabled; }
	bool pinyinEnabled() const { return m_pinyinEnabled; }
@@ -130,6 +131,7 @@ class Preferences : public QObject

	bool m_sysUiNoHomeButtonMode;
	bool m_sysUiEnableNextPrevGestures;
+	int m_myPreferencesVariable;

	bool m_imeEnabled;
	bool m_pinyinEnabled;

Getting Preferences to see it

Next, you need to modify Preferences.cpp. You should add an entry for your variable to the constructor of Preferences with some default value, just in case the Preferences service fails for any reason:

@@ -65,6 +65,7 @@ Preferences* Preferences::instance()
	, m_playFeedbackSounds(true)
	, m_sysUiNoHomeButtonMode(true)
	, m_sysUiEnableNextPrevGestures(false)
+	, m_myPreferencesVariable(1)
	, m_lockTimeout(0)
	, m_lsHandle(0)
	, m_imeEnabled(false)

Then add it to the list of variables queried by serverConnectCallback:

@@ -565,6 +566,7 @@ bool Preferences::serverConnectCallback(LSHandle *sh, LSMessage *message, void *
		\"imeType\", \
		\"sysUiNoHomeButtonMode\", \
		\"sysUiEnableNextPrevGestures\", \
+		\"myPreferencesVariable\", \
		\"airplaneMode\", \
		\"hideWANAlert\", \
		\"roamingIndicator\", \

And add a check for it in getPreferencesCallback (copy pasted from the one above) making sure to modify json_object_get_int(label) to match your variable's data type:

@@ -841,6 +843,14 @@ bool Preferences::getPreferencesCallback(LSHandle *sh, LSMessage *message, void
		}
	}

+	label = json_object_object_get(json, "myPreferencesVariable");
+	if (label && !is_error(label)) {
+
+		if (prefObjPtr) {
+			prefObjPtr->m_myPreferencesVariable = json_object_get_int(label);
+		}
+	}
+
	label = json_object_object_get(json, "lockTimeout");
	if (label && !is_error(label) && json_object_is_type(label, json_type_int)) {

Adding an entry to Tweaks

Now you have a variable, Tweaks needs to know about it. Luna entries are stored in json format, exactly the same as a standard Tweaks entry.

The category for your tweak should be "luna" and it should have a "prefserv" entry- this is the name of the variable that you created in the previous step, so for the sake of this example it would be 'myPreferencesVariable'. When the user changes this value from inside Tweaks, it will call the setPreference PalmService and modify the variable.

An example Luna json:

[
  {
    "category": "luna",
    "prefs": [ {
      "group": "preferences",
      "restart": "none",
      "prefserv": "myPreferencesVariable",
      "label": "my preferences variable",
      "key": "prefsvariable",
      "type": "IntegerPicker",
      "value": 1,
      "min": 1,
      "max": 10
    } ]
  }
]

When you've created your json, give it a relevant name (recommended is the same name as your Luna branch) and place it in then conf/ folder of your LunaSysMgr directory. Also, make sure it's initial value matches the value your initialised your private m_myPreferencesVariable to.

Using the Preference

Now you have your variable hooked into Tweaks, you can use it for whatever you like. You can get it from inside Luna by #include-ing Preferences.h and calling the following:

Preferences::instance()->myPreferencesVariable()

Update:

Because certain parts of LunaSysMgr are initialised before Preferences (StatusBar.cpp, for instance) any Preferences calls made in their init() method or constructor will always return false.

As a solution to this, a new Q_SIGNAL called 'signalGetPrefsComplete()' has been implemented, it fires as soon as the Preferences object finishes initialising and can be used as follows:

FooClass::FooClass()
	: m_barVariable(!Settings::LunaSettings()->virtualKeyboardEnabled)
	, m_hoobadah(0)
{
	connect(Preferences::instance(), SIGNAL(signalGetPrefsComplete()), this, SLOT(slotGetPrefsComplete()));
}

void FooClass::slotGetPrefsComplete()
{
	m_hoobadah = Preferences::instance()->sysUiHoobadah();
}

LunaCE APIs

This page details new APIs introduced during the development of LunaCE.

Dynamic Dashboard Height

Dashboard Clock Widget

LunaCE 4.4.2 introduces the ability to create dynamically-sized dashboard notifications up to a maximum size of 320px.

This is controlled by the 'dashHeight' window attribute, which takes the height of your dashboard in pixels and is passed to your application framework's window opening function.

Note: Currently Dashboard notifications cannot receive keyboard input.


Examples:

enyo2

window.open("myDashboard.html", "My Dashboard", 'attributes={"window": "dashboard", "dashHeight": 240}');

enyo-1.0

enyo.windows.openDashboard("myDashboard.html", "My Dashboard", {}, {dashHeight: 240});


Template

A basic enyo2 template for dynamically-sized dashboard widgets is available here:

http://github.com/ShiftyAxel/dynamic-dash-template

Dynamic Dashboard Template











Issues & Fixes

Resolving Syngergy Issues

Some TouchPad users are reporting issues with logging in to Synergy accounts after installing the Community Edition of the Luna System Manager (LunaCE, formerly known as UberLunah).

To fix this issue, users should:

  1. Re-install/restore the Palm LunaSysMgr from Preware
  2. Reboot the TouchPad
  3. Remove all Synergy accounts except the default HP WebOS Account
  4. Install the latest version of LunaCE from Preware
  5. Reboot the TouchPad again
  6. Re-add all of your Synergy accounts with the correct login information
  7. Enjoy your email, Facebook pictures, Box.net files, and/or Skype integration again!

LunaCE Regression Table

This is thought to be used by users as well as developers to keep track of features/apps that stopped working with WOCE.

As soon as there are multiple confirmations and the origin of the issue has been found, please open a bug report on our bugtracker and add the link into the table.

Broken features

Feature name What's happening? What happened
in the stock version?
Possible reasons Bug tracker link confirmations/contradictions
(please sign your comment with --~~~~)
Example line to demonstrate how you might want to use this table test test test

#39


blaaah --pcworld 20:21, 12 August 2012 (UTC)
don't agree--pcworld 20:21, 12 August 2012 (UTC)

Broken (third-party) apps

App name (app id) What's happening? What happened
in the stock version?
Possible reasons Bug tracker link confirmations/contradictions
(please sign your comment with --~~~~)
TouchPlayer selected in BHome preferences as media player TouchPlayer does not open videos in BHome TouchPlayer successfully opened videos when selected in BHome preferences