From 94fa2bd2567b925ff7e2eb88cab7dfeddbffd885 Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Sat, 25 Jun 2005 08:45:00 +0000 Subject: [PATCH] inlined a few methods in header file, otherwise app_server would not build git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13271 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/Desktop.cpp | 68 ------------------------------------- src/servers/app/Desktop.h | 42 +++++++++++++++++------ 2 files changed, 31 insertions(+), 79 deletions(-) diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index 2ac3cb429b..1881636c2a 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -144,27 +144,6 @@ Desktop::InitMode() //--------------------------------------------------------------------------- -inline Screen * -Desktop::ScreenAt(int32 index) const -{ - return static_cast(fScreenList.ItemAt(index)); -} - - -inline int32 -Desktop::ScreenCount(void) const -{ - return fScreenList.CountItems(); -} - - -inline Screen * -Desktop::ActiveScreen(void) const -{ - return fActiveScreen; -} - - inline void Desktop::SetActiveRootLayerByIndex(int32 listIndex) { @@ -185,53 +164,6 @@ Desktop::SetActiveRootLayer(RootLayer *rootLayer) } -RootLayer * -Desktop::ActiveRootLayer(void) const -{ - return fActiveRootLayer; -} - - -inline int32 -Desktop::ActiveRootLayerIndex(void) const -{ - int32 rootLayerCount = CountRootLayers(); - - for (int32 i = 0; i < rootLayerCount; i++) { - if (fActiveRootLayer == (RootLayer *)fRootLayerList.ItemAt(i)) - return i; - } - return -1; -} - - -inline RootLayer * -Desktop::RootLayerAt(int32 index) -{ - return static_cast(fRootLayerList.ItemAt(index)); -} - - -inline int32 -Desktop::CountRootLayers() const -{ - return fRootLayerList.CountItems(); -} - - -inline DisplayDriver * -Desktop::GetDisplayDriver() const -{ - return ScreenAt(0)->GetDisplayDriver(); -} - -inline HWInterface * -Desktop::GetHWInterface() const -{ - return ScreenAt(0)->GetHWInterface(); -} - - //--------------------------------------------------------------------------- // Methods for layer(WinBorder) manipulation. //--------------------------------------------------------------------------- diff --git a/src/servers/app/Desktop.h b/src/servers/app/Desktop.h index 3fd18f37b1..c5ca068019 100644 --- a/src/servers/app/Desktop.h +++ b/src/servers/app/Desktop.h @@ -15,6 +15,7 @@ #include #include #include +#include class BMessage; class BPortLink; @@ -22,7 +23,6 @@ class DisplayDriver; class HWInterface; class Layer; class RootLayer; -class Screen; class WinBorder; class Desktop { @@ -37,19 +37,39 @@ class Desktop { void InitMode(); // Methods for multiple monitors. - Screen* ScreenAt(int32 index) const; - int32 ScreenCount() const; - Screen* ActiveScreen() const; - + inline Screen* ScreenAt(int32 index) const + { return static_cast(fScreenList.ItemAt(index)); } + inline int32 ScreenCount() const + { return fScreenList.CountItems(); } + inline Screen* ActiveScreen() const + { return fActiveScreen; } + void SetActiveRootLayerByIndex(int32 index); void SetActiveRootLayer(RootLayer* layer); - RootLayer* RootLayerAt(int32 index); - RootLayer* ActiveRootLayer() const; - int32 ActiveRootLayerIndex() const; - int32 CountRootLayers() const; + inline RootLayer* RootLayerAt(int32 index) + { return static_cast(fRootLayerList.ItemAt(index)); } + RootLayer* ActiveRootLayer() const + { return fActiveRootLayer;} + int32 ActiveRootLayerIndex() const + { + int32 rootLayerCount = CountRootLayers(); + + for (int32 i = 0; i < rootLayerCount; i++) { + if (fActiveRootLayer == (RootLayer *)fRootLayerList.ItemAt(i)) + return i; + } + return -1; + } + + inline int32 CountRootLayers() const + { return fRootLayerList.CountItems(); } + + + inline DisplayDriver* GetDisplayDriver() const + { return ScreenAt(0)->GetDisplayDriver(); } + inline HWInterface* GetHWInterface() const + { return ScreenAt(0)->GetHWInterface(); } - DisplayDriver* GetDisplayDriver() const; - HWInterface* GetHWInterface() const; // Methods for layer(WinBorder) manipulation. void AddWinBorder(WinBorder *winBorder);