luna-sysmgr-common
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HostArmTopaz Class Reference
Inheritance diagram for HostArmTopaz:
[legend]
Collaboration diagram for HostArmTopaz:
[legend]

Public Member Functions

 HostArmTopaz ()
 
virtual ~HostArmTopaz ()
 
virtual const char * hardwareName () const
 
virtual bool homeButtonWakesUpScreen ()
 
virtual int getNumberOfSwitches () const
 
virtual OrientationEventpostProcessDeviceOrientation (OrientationEvent *currOrientation)
 
- Public Member Functions inherited from HostArm
 HostArm ()
 
virtual ~HostArm ()
 
virtual void init (int w, int h)
 
virtual void show ()
 
int readHidEvents (int fd, struct input_event *eventBuf, int bufSize)
 
virtual InputControlgetInputControlALS ()
 
virtual InputControlgetInputControlBluetoothInputDetect ()
 
virtual InputControlgetInputControlProximity ()
 
virtual InputControlgetInputControlTouchpanel ()
 
virtual InputControlgetInputControlKeys ()
 
virtual LedControlgetLedControlKeypadAndDisplay ()
 
virtual void OrientationSensorOn (bool enable)
 
virtual void setBluetoothKeyboardActive (bool active)
 
virtual bool bluetoothKeyboardActive () const
 
- Public Member Functions inherited from HostBase
virtual ~HostBase ()
 
const HostInfogetInfo () const
 
virtual void run ()
 
virtual void quit ()
 
virtual unsigned short translateKeyWithMeta (unsigned short key, bool withShift, bool withAlt)
 
void lockPainting ()
 
void unlockPainting ()
 
virtual void setMetaModifier (bool metaKeyDown)
 
virtual bool metaModifier ()
 
void turboModeSubscription (bool add)
 
virtual bool hasAltKey (Qt::KeyboardModifiers modifiers)
 
void setOrientation (OrientationEvent::Orientation o)
 
QPoint map (const QPoint &pt)
 
- Public Member Functions inherited from TaskBase
 TaskBase ()
 
virtual ~TaskBase ()
 
void postEvent (sptr< Event > event, bool highPriority=false)
 
GMainLoop * mainLoop () const
 
SingletonTimermasterTimer () const
 
- Public Member Functions inherited from RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
void ref ()
 
void deref ()
 

Protected Member Functions

virtual void turboMode (bool enable)
 
- Protected Member Functions inherited from HostArm
virtual void wakeUpLcd ()
 
virtual int screenX (int rawX, Event::Type type)
 
virtual int screenY (int rawY, Event::Type type)
 
virtual void setCentralWidget (QWidget *view)
 
void setupInput (void)
 
void shutdownInput (void)
 
void startService (void)
 
void stopService (void)
 
void disableScreenBlanking ()
 
virtual void flip ()
 
virtual QImage takeScreenShot () const
 
virtual QImage takeAppDirectRenderingScreenShot () const
 
virtual void setAppDirectRenderingLayerEnabled (bool enable)
 
virtual void setRenderingLayerEnabled (bool enable)
 
virtual void NYXDataAvailable (NYXConnectorBase::Sensor aSensorType)
 
- Protected Member Functions inherited from HostBase
 HostBase ()
 
virtual void handleEvent (sptr< Event >)
 

Additional Inherited Members

- Signals inherited from HostBase
void signalBluetoothKeyboardActive (bool active)
 
- Static Public Member Functions inherited from HostBase
static HostBaseinstance ()
 
static bool hostIsQemu ()
 
- Protected Slots inherited from HostArm
void readALSData ()
 
void readProxData ()
 
- Static Protected Member Functions inherited from HostArm
static bool getMsgValueInt (LSMessage *msg, int &value)
 
- Protected Attributes inherited from HostArm
QSocketNotifier * m_nyxLightNotifier
 
QSocketNotifier * m_nyxProxNotifier
 
int m_fb0Fd
 
int m_fb1Fd
 
void * m_fb0Buffer
 
int m_fb0NumBuffers
 
void * m_fb1Buffer
 
int m_fb1NumBuffers
 
LSHandle * m_service
 
InputControlm_nyxInputControlALS
 
InputControlm_nyxInputControlBluetoothInputDetect
 
InputControlm_nyxInputControlProx
 
InputControlm_nyxInputControlKeys
 
InputControlm_nyxInputControlTouchpanel
 
LedControlm_nyxLedControlKeypadAndDisplay
 
bool m_bluetoothKeyboardActive
 
NYXOrientationSensorConnectorm_OrientationSensor
 

Detailed Description

Device-specific functionality for the Topaz devices

Device details:

  • ARMv7.
  • Turbo mode from 40% to 95% of speed.
  • Switches (2): headphones inserted and power.
  • Raw orientation readings are rotated +90 degrees from correct orientation before being translated.
  • Home button wakes up the screen.
See Also
https://en.wikipedia.org/wiki/HP_TouchPad

Constructor & Destructor Documentation

HostArmTopaz::HostArmTopaz ( )

Constructs a Topaz device host

HostArmTopaz::~HostArmTopaz ( )
virtual

Destroys a Topaz device host

Member Function Documentation

int HostArmTopaz::getNumberOfSwitches ( ) const
virtual

Gets the number of hardware switches the current host device has

As an example, the Palm Pre has 3 switches:

  • Ringer on/off.
  • Slider opened/closed.
  • Headphones inserted/no headphones.
Returns
Number of hardware switches the device has.

Reimplemented from HostArm.

const char * HostArmTopaz::hardwareName ( ) const
virtual

Reimplemented from HostArm.

bool HostArmTopaz::homeButtonWakesUpScreen ( )
virtual

Presumably whether the Home button wakes up the screen

This is seldom used and largely undocumented. Description is more or less a guess.

Todo:
Determine with certainty what this method is for.
Returns
Presumably true if pressing the Home button wakes up the screen and false otherwise.

Reimplemented from HostBase.

OrientationEvent * HostArmTopaz::postProcessDeviceOrientation ( OrientationEvent currOrientation)
virtual

For Topaz, the orientation events are rotated by +90 relative to the display orientation. For Topaz Screen up = Left Orientation

Following is the actual screen (Frame Buffer) orientation

  Left(90)
-----------
|         |
|         |

UP | | Down (180) 0 | |

| |

o <- home button

Right(270/-90)

But, Nyx gives us data 270 rotated clock-wise (-90 anti clock-wise)

        Up
    -----------
    |         |
    |         |

Right | | Left | |

| |

o <- home button

Down

Reimplemented from HostBase.

void HostArmTopaz::turboMode ( bool  enable)
protectedvirtual

Enables/disables turbo mode

Changes CPU frequency scaling. When turbo mode is enabled, the CPU is set to run at full speed. When disabled, it turns the speed down to save on power usage.

Parameters
enabletrue to enable turbo mode, false to disable it

Reimplemented from HostBase.


The documentation for this class was generated from the following file: