LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WindowServer Class Referenceabstract

#include <WindowServer.h>

Inheritance diagram for WindowServer:
[legend]
Collaboration diagram for WindowServer:
[legend]

Public Types

enum  RotationMode {
  RotationMode_FreeRotation = 0, RotationMode_NoRotation = 1, RotationMode_LimitedLandscape = 2, RotationMode_LimitedPortrait = 3,
  RotationMode_FixedPortrait = 4, RotationMode_FixedLandscape = 5, RotationMode_FixedPortraitInverted = 6, RotationMode_FixedLandscapeInverted = 7
}
 

Signals

void signalWindowUpdated (Window *)
 
void signalAboutToTakeScreenShot ()
 
void signalTookScreenShot ()
 
void signalUiRotated ()
 
void signalTouchesReleasedFromScreen ()
 

Public Member Functions

virtual ~WindowServer ()
 
virtual void addWindow (Window *win)
 
virtual void removeWindow (Window *win)
 
virtual void focusWindow (Window *win)
 
virtual void unfocusWindow (Window *win)
 
virtual void windowUpdated (Window *win)
 
virtual void prepareAddWindow (Window *win)
 
virtual void addWindowTimedOut (Window *win)
 
void bootupFinished ()
 
void startProgressAnimation (ProgressAnimation::Type type=ProgressAnimation::TypeHp)
 
void stopProgressAnimation ()
 
bool progressRunning () const
 
virtual void startDrag (int x, int y, void *imgRef, const std::string &lpid)
 
virtual void endDrag (int x, int y, const std::string &lpid, bool handled)
 
virtual void applyLaunchFeedback (int centerX, int centerY)
 
virtual void appLaunchPreventedUnderLowMemory ()
 
DisplayManagerdisplayManager () const
 
MetaKeyManagermetaKeyManager () const
 
CoreNaviManagercoreNaviManager () const
 
bool takeScreenShot (const char *path)
 
virtual QPixmap * takeScreenShot ()
 
OrientationEvent::Orientation getOrientation () const
 
OrientationEvent::Orientation getUiOrientation () const
 
void setPaintingDisabled (bool val)
 
virtual void cancelVibrations ()
 
void shutdown ()
 
void setWindowProperties (Window *win, const WindowProperties &props)
 
WindowManagerBaseinputWindowManager () const
 
virtual WindowManagerBasegetWindowManagerByClassName (const QString &undecoratedClassName) const
 
virtual WindowManagerBasewindowManagerForWindow (Window *wm) const =0
 
virtual void resizeWindowManagers (int width, int height)
 
virtual bool okToResizeUi (bool ignorePendingRequests=false)
 
bool deviceIsPortraitType () const
 
virtual QDeclarativeEngine * declarativeEngine ()
 
virtual QRectF mapRectToRoot (const QGraphicsItem *item, const QRectF &rect) const
 
virtual bool enqueueWindowForFlip (Window *window, QRect &windowScreenBoundaries, bool sync)
 
virtual bool removeWindowFromFlipQueue (Window *window)
 
void setUiRotationMode (RotationMode uiRotationMode, bool cardMaximizing=false, bool skipAnimation=false)
 
bool touchOnScreen () const
 

Static Public Member Functions

static WindowServerinstance ()
 
static void registerWindow (Window *win)
 
static void unregisterWindow (Window *win)
 
static bool windowIsRegistered (Window *win)
 
static void markBootStart ()
 
static void markBootFinish ()
 
static void enableFpsCounter (bool enable)
 
static void dumpFpsHistory ()
 
static void resetFpsBuffer (int newBufSize)
 
static void enableTouchPlotOption (TouchPlot::TouchPlotOption_t type, bool enable)
 
static SharedGlobalPropertiesglobalProperties ()
 

Protected Types

enum  UiRotationAnimationType { Rotation_NoAnimation = 0, Rotation_RotateAndCrossFade, Rotation_CrossFadeOnly }
 
typedef QMap< QString,
QPointer< WindowManagerBase >
>::const_iterator 
WindowManagerMapConstIter
 
typedef QMap< QString,
QPointer< WindowManagerBase >
>::iterator 
WindowManagerMapIter
 

Protected Member Functions

 WindowServer ()
 
virtual bool handleEvent (QEvent *event)
 
virtual bool viewportEvent (QEvent *event)
 
virtual bool sysmgrEventFilters (QEvent *event)=0
 
virtual bool eventFilter (QObject *, QEvent *)
 
virtual bool processSystemShortcut (QEvent *event)
 
void setOrientation (OrientationEvent::Orientation newOrient)
 
int angleForOrientation (OrientationEvent::Orientation orient)
 
virtual bool isOrientationAllowed (OrientationEvent::Orientation newOrient)
 
void setUiOrientation (OrientationEvent::Orientation newOrient, UiRotationAnimationType animation=Rotation_RotateAndCrossFade)
 
void rotateUi (OrientationEvent::Orientation newOrientation, UiRotationAnimationType animation=Rotation_RotateAndCrossFade, bool forceResize=false)
 
virtual void rotatePendingWindows ()
 
virtual void cancelPendingWindowRotations ()
 
virtual void updateWallpaperForRotation (OrientationEvent::Orientation)
 
void cacheFocusedItem ()
 
void restoreCachedFocusItem ()
 

Protected Attributes

DisplayManagerm_displayMgr
 
InputManagerm_inputMgr
 
MetaKeyManagerm_metaKeyMgr
 
CoreNaviManagerm_coreNaviMgr
 
WindowManagerBasem_inputWindowMgr
 
uint32_t m_screenWidth
 
uint32_t m_screenHeight
 
bool m_deviceIsPortraitType
 
QGraphicsItemGroupm_uiElementsGroup
 
ReticleItemm_reticle
 
bool m_bootingUp
 
bool m_fingerDownOnScreen
 
bool m_runningProgress
 
ProgressAnimationm_progressAnim
 
UiRootItem m_uiRootItem
 
UiRotationAnimationType m_inRotationAnimation
 
RotationMode m_uiRotationMode
 
OrientationEvent::Orientation m_orientation
 
OrientationEvent::Orientation m_currentUiOrientation
 
OrientationEvent::Orientation m_pendingOrientation
 
UiRotationAnimationType m_pendingRotationType
 
int m_animationTargetRotationAngle
 
QQueue< t_cardFlipRequestm_pendingFlipRequests
 
QMultiMap< QString, QPointer
< WindowManagerBase > > 
m_windowManagerMap
 

Member Typedef Documentation

typedef QMap<QString,QPointer<WindowManagerBase> >::const_iterator WindowServer::WindowManagerMapConstIter
protected
typedef QMap<QString,QPointer<WindowManagerBase> >::iterator WindowServer::WindowManagerMapIter
protected

Member Enumeration Documentation

Enumerator
RotationMode_FreeRotation 
RotationMode_NoRotation 
RotationMode_LimitedLandscape 
RotationMode_LimitedPortrait 
RotationMode_FixedPortrait 
RotationMode_FixedLandscape 
RotationMode_FixedPortraitInverted 
RotationMode_FixedLandscapeInverted 
Enumerator
Rotation_NoAnimation 
Rotation_RotateAndCrossFade 
Rotation_CrossFadeOnly 

Constructor & Destructor Documentation

WindowServer::~WindowServer ( )
virtual
WindowServer::WindowServer ( )
protected

Member Function Documentation

void WindowServer::addWindow ( Window win)
virtual

Reimplemented in WindowServerLuna, and WindowServerMinimal.

void WindowServer::addWindowTimedOut ( Window win)
virtual

Reimplemented in WindowServerLuna.

int WindowServer::angleForOrientation ( OrientationEvent::Orientation  orient)
protected
virtual void WindowServer::appLaunchPreventedUnderLowMemory ( )
inlinevirtual

Reimplemented in WindowServerLuna.

void WindowServer::applyLaunchFeedback ( int  centerX,
int  centerY 
)
virtual

Reimplemented in WindowServerLuna.

void WindowServer::bootupFinished ( )
void WindowServer::cacheFocusedItem ( )
protected
void WindowServer::cancelPendingWindowRotations ( )
protectedvirtual
void WindowServer::cancelVibrations ( )
virtual
CoreNaviManager* WindowServer::coreNaviManager ( ) const
inline
virtual QDeclarativeEngine* WindowServer::declarativeEngine ( )
inlinevirtual

Reimplemented in WindowServerLuna.

bool WindowServer::deviceIsPortraitType ( ) const
inline
DisplayManager* WindowServer::displayManager ( ) const
inline
void WindowServer::dumpFpsHistory ( )
static
void WindowServer::enableFpsCounter ( bool  enable)
static
void WindowServer::enableTouchPlotOption ( TouchPlot::TouchPlotOption_t  type,
bool  enable 
)
static
void WindowServer::endDrag ( int  x,
int  y,
const std::string &  lpid,
bool  handled 
)
virtual

Reimplemented in WindowServerLuna.

bool WindowServer::enqueueWindowForFlip ( Window window,
QRect &  windowScreenBoundaries,
bool  sync 
)
virtual
bool WindowServer::eventFilter ( QObject obj,
QEvent event 
)
protectedvirtual
void WindowServer::focusWindow ( Window win)
virtual

Reimplemented in WindowServerLuna, and WindowServerMinimal.

OrientationEvent::Orientation WindowServer::getOrientation ( ) const
inline
OrientationEvent::Orientation WindowServer::getUiOrientation ( ) const
inline
WindowManagerBase * WindowServer::getWindowManagerByClassName ( const QString &  undecoratedClassName) const
virtual
SharedGlobalProperties * WindowServer::globalProperties ( )
static
bool WindowServer::handleEvent ( QEvent event)
protectedvirtual
WindowManagerBase* WindowServer::inputWindowManager ( ) const
inline
WindowServer * WindowServer::instance ( void  )
static
bool WindowServer::isOrientationAllowed ( OrientationEvent::Orientation  newOrient)
protectedvirtual
QRectF WindowServer::mapRectToRoot ( const QGraphicsItem item,
const QRectF &  rect 
) const
virtual

Reimplemented in WindowServerLuna, and WindowServerMinimal.

void WindowServer::markBootFinish ( )
static
void WindowServer::markBootStart ( )
static
MetaKeyManager* WindowServer::metaKeyManager ( ) const
inline
virtual bool WindowServer::okToResizeUi ( bool  ignorePendingRequests = false)
inlinevirtual

Reimplemented in WindowServerLuna, and WindowServerMinimal.

void WindowServer::prepareAddWindow ( Window win)
virtual

Reimplemented in WindowServerLuna, and WindowServerMinimal.

bool WindowServer::processSystemShortcut ( QEvent event)
protectedvirtual
bool WindowServer::progressRunning ( ) const
inline
void WindowServer::registerWindow ( Window win)
static
void WindowServer::removeWindow ( Window win)
virtual

Reimplemented in WindowServerLuna, and WindowServerMinimal.

bool WindowServer::removeWindowFromFlipQueue ( Window window)
virtual
void WindowServer::resetFpsBuffer ( int  newBufSize)
static
void WindowServer::resizeWindowManagers ( int  width,
int  height 
)
virtual

Reimplemented in WindowServerLuna, and WindowServerMinimal.

void WindowServer::restoreCachedFocusItem ( )
protected
void WindowServer::rotatePendingWindows ( )
protectedvirtual
void WindowServer::rotateUi ( OrientationEvent::Orientation  newOrientation,
UiRotationAnimationType  animation = Rotation_RotateAndCrossFade,
bool  forceResize = false 
)
protected
void WindowServer::setOrientation ( OrientationEvent::Orientation  newOrient)
protected
void WindowServer::setPaintingDisabled ( bool  val)
void WindowServer::setUiOrientation ( OrientationEvent::Orientation  newOrient,
UiRotationAnimationType  animation = Rotation_RotateAndCrossFade 
)
protected
void WindowServer::setUiRotationMode ( RotationMode  uiRotationMode,
bool  cardMaximizing = false,
bool  skipAnimation = false 
)
void WindowServer::setWindowProperties ( Window win,
const WindowProperties &  props 
)
void WindowServer::shutdown ( )
void WindowServer::signalAboutToTakeScreenShot ( )
signal
void WindowServer::signalTookScreenShot ( )
signal
void WindowServer::signalTouchesReleasedFromScreen ( )
signal
void WindowServer::signalUiRotated ( )
signal
void WindowServer::signalWindowUpdated ( Window )
signal
void WindowServer::startDrag ( int  x,
int  y,
void *  imgRef,
const std::string &  lpid 
)
virtual

Reimplemented in WindowServerLuna.

void WindowServer::startProgressAnimation ( ProgressAnimation::Type  type = ProgressAnimation::TypeHp)
void WindowServer::stopProgressAnimation ( )
virtual bool WindowServer::sysmgrEventFilters ( QEvent event)
protectedpure virtual

Implemented in WindowServerMinimal.

bool WindowServer::takeScreenShot ( const char *  path)
QPixmap * WindowServer::takeScreenShot ( )
virtual

Reimplemented in WindowServerMinimal.

bool WindowServer::touchOnScreen ( ) const
inline
void WindowServer::unfocusWindow ( Window win)
virtual

Reimplemented in WindowServerLuna.

void WindowServer::unregisterWindow ( Window win)
static
virtual void WindowServer::updateWallpaperForRotation ( OrientationEvent::Orientation  )
inlineprotectedvirtual
bool WindowServer::viewportEvent ( QEvent event)
protectedvirtual
bool WindowServer::windowIsRegistered ( Window win)
static
virtual WindowManagerBase* WindowServer::windowManagerForWindow ( Window wm) const
pure virtual

Implemented in WindowServerLuna, and WindowServerMinimal.

void WindowServer::windowUpdated ( Window win)
virtual

Reimplemented in WindowServerLuna.

Member Data Documentation

int WindowServer::m_animationTargetRotationAngle
protected
bool WindowServer::m_bootingUp
protected
CoreNaviManager* WindowServer::m_coreNaviMgr
protected
OrientationEvent::Orientation WindowServer::m_currentUiOrientation
protected
bool WindowServer::m_deviceIsPortraitType
protected
DisplayManager* WindowServer::m_displayMgr
protected
bool WindowServer::m_fingerDownOnScreen
protected
InputManager* WindowServer::m_inputMgr
protected
WindowManagerBase* WindowServer::m_inputWindowMgr
protected
UiRotationAnimationType WindowServer::m_inRotationAnimation
protected
MetaKeyManager* WindowServer::m_metaKeyMgr
protected
OrientationEvent::Orientation WindowServer::m_orientation
protected
QQueue<t_cardFlipRequest> WindowServer::m_pendingFlipRequests
protected
OrientationEvent::Orientation WindowServer::m_pendingOrientation
protected
UiRotationAnimationType WindowServer::m_pendingRotationType
protected
ProgressAnimation* WindowServer::m_progressAnim
protected
ReticleItem* WindowServer::m_reticle
protected
bool WindowServer::m_runningProgress
protected
uint32_t WindowServer::m_screenHeight
protected
uint32_t WindowServer::m_screenWidth
protected
QGraphicsItemGroup* WindowServer::m_uiElementsGroup
protected
UiRootItem WindowServer::m_uiRootItem
protected
RotationMode WindowServer::m_uiRotationMode
protected
QMultiMap<QString,QPointer<WindowManagerBase> > WindowServer::m_windowManagerMap
protected

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