Janitorial work and minor ServerWindow tweaks

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7907 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2004-06-11 14:47:36 +00:00
parent 768ec791c9
commit 70e337a0b4
4 changed files with 702 additions and 809 deletions
+54 -45
View File
@@ -53,13 +53,14 @@
//#define DISPLAYDRIVER_TEST_HACK //#define DISPLAYDRIVER_TEST_HACK
//---------------------------------------------------------------------------
RootLayer::RootLayer(const char *name, int32 workspaceCount, RootLayer::RootLayer(const char *name, int32 workspaceCount,
Desktop *desktop, DisplayDriver *driver) Desktop *desktop, DisplayDriver *driver)
: Layer(BRect(0,0,0,0), name, 0, B_FOLLOW_ALL, B_WILL_DRAW, driver) : Layer(BRect(0,0,0,0), name, 0, B_FOLLOW_ALL, B_WILL_DRAW, driver)
{ {
fDesktop = desktop; fDesktop = desktop;
//NOTE: be careful about this one.
//NOTE: be careful about this one.
fRootLayer = this; fRootLayer = this;
fActiveWorkspace = NULL; fActiveWorkspace = NULL;
fRows = 0; fRows = 0;
@@ -75,12 +76,12 @@ RootLayer::RootLayer(const char *name, int32 workspaceCount,
SetWorkspaceCount(workspaceCount); SetWorkspaceCount(workspaceCount);
} }
//---------------------------------------------------------------------------
RootLayer::~RootLayer() RootLayer::~RootLayer()
{ {
// RootLayer object just uses Screen objects, it is not allowed to delete them. // RootLayer object just uses Screen objects, it is not allowed to delete them.
} }
//---------------------------------------------------------------------------
void RootLayer::Draw(const BRect &r) void RootLayer::Draw(const BRect &r)
{ {
// REMOVEME: This method is here because of DisplayDriver testing ONLY. // REMOVEME: This method is here because of DisplayDriver testing ONLY.
@@ -154,39 +155,40 @@ void RootLayer::Draw(const BRect &r)
_driver->FillRoundRect(BRect(800,1000,1200,1090),30,40,_layerdata,pattern2); _driver->FillRoundRect(BRect(800,1000,1200,1090),30,40,_layerdata,pattern2);
_driver->FillPolygon(polygon,6,polygonRect,_layerdata,pattern); _driver->FillPolygon(polygon,6,polygonRect,_layerdata,pattern);
// _driver->FillTriangle(triangle,triangleRect,_layerdata,pattern); // _driver->FillTriangle(triangle,triangleRect,_layerdata,pattern);
#endif
#endif // end DISPLAYDRIVER_TEST_HACK
} }
//---------------------------------------------------------------------------
void RootLayer::MoveBy(float x, float y) void RootLayer::MoveBy(float x, float y)
{ {
} }
//---------------------------------------------------------------------------
void RootLayer::ResizeBy(float x, float y) void RootLayer::ResizeBy(float x, float y)
{ {
// TODO: implement // TODO: implement
} }
//---------------------------------------------------------------------------
Layer* RootLayer::VirtualTopChild() const Layer* RootLayer::VirtualTopChild() const
{ {
return fActiveWorkspace->GoToTopItem(); return fActiveWorkspace->GoToTopItem();
} }
//---------------------------------------------------------------------------
Layer* RootLayer::VirtualLowerSibling() const Layer* RootLayer::VirtualLowerSibling() const
{ {
return fActiveWorkspace->GoToLowerItem(); return fActiveWorkspace->GoToLowerItem();
} }
//---------------------------------------------------------------------------
Layer* RootLayer::VirtualUpperSibling() const Layer* RootLayer::VirtualUpperSibling() const
{ {
return fActiveWorkspace->GoToUpperItem(); return fActiveWorkspace->GoToUpperItem();
} }
//---------------------------------------------------------------------------
Layer* RootLayer::VirtualBottomChild() const Layer* RootLayer::VirtualBottomChild() const
{ {
return fActiveWorkspace->GoToBottomItem(); return fActiveWorkspace->GoToBottomItem();
} }
//---------------------------------------------------------------------------
void RootLayer::AddWinBorderToWorkspaces(WinBorder* winBorder, uint32 wks) void RootLayer::AddWinBorderToWorkspaces(WinBorder* winBorder, uint32 wks)
{ {
if (!(fMainLock.IsLocked())) if (!(fMainLock.IsLocked()))
@@ -204,7 +206,7 @@ void RootLayer::AddWinBorderToWorkspaces(WinBorder* winBorder, uint32 wks)
WorkspaceAt(i+1)->AddLayerPtr(winBorder); WorkspaceAt(i+1)->AddLayerPtr(winBorder);
} }
} }
//---------------------------------------------------------------------------
void RootLayer::AddWinBorder(WinBorder* winBorder) void RootLayer::AddWinBorder(WinBorder* winBorder)
{ {
// The main job of this function, besides adding winBorder as a child, is to determine // The main job of this function, besides adding winBorder as a child, is to determine
@@ -235,7 +237,6 @@ void RootLayer::AddWinBorder(WinBorder* winBorder)
// will be called. // will be called.
break; break;
} }
case B_MODAL_APP_WINDOW_FEEL: case B_MODAL_APP_WINDOW_FEEL:
{ {
// add to app's list of Floating/Modal windows (as opposed to the system's) // add to app's list of Floating/Modal windows (as opposed to the system's)
@@ -317,7 +318,6 @@ void RootLayer::AddWinBorder(WinBorder* winBorder)
AddWinBorderToWorkspaces(winBorder, winBorder->Window()->Workspaces()); AddWinBorderToWorkspaces(winBorder, winBorder->Window()->Workspaces());
break; break;
} }
case B_SYSTEM_LAST: case B_SYSTEM_LAST:
case B_SYSTEM_FIRST: case B_SYSTEM_FIRST:
{ {
@@ -338,14 +338,12 @@ void RootLayer::AddWinBorder(WinBorder* winBorder)
STRACE(("#RootLayer::AddWinBorder(%s)\n", winBorder->GetName())); STRACE(("#RootLayer::AddWinBorder(%s)\n", winBorder->GetName()));
} }
//---------------------------------------------------------------------------
void RootLayer::RemoveWinBorder(WinBorder* winBorder) void RootLayer::RemoveWinBorder(WinBorder* winBorder)
{ {
// This method does 3 things: // This method does 3 things:
// 1) Removes MODAL/SUBSET windows from system/app/window subset list. // 1) Removes MODAL/SUBSET windows from system/app/window subset list.
// 2) Removes this window from any workspace it appears in. // 2) Removes this window from any workspace it appears in.
// 3) Removes this window from RootLayer's list of chilren. // 3) Removes this window from RootLayer's list of children.
desktop->fGeneralLock.Lock(); desktop->fGeneralLock.Lock();
fMainLock.Lock(); fMainLock.Lock();
@@ -355,11 +353,13 @@ void RootLayer::RemoveWinBorder(WinBorder* winBorder)
{ {
desktop->RemoveSubsetWindow(winBorder); desktop->RemoveSubsetWindow(winBorder);
} }
else if (feel == B_MODAL_APP_WINDOW_FEEL || feel == B_FLOATING_APP_WINDOW_FEEL) else
if (feel == B_MODAL_APP_WINDOW_FEEL || feel == B_FLOATING_APP_WINDOW_FEEL)
{ {
RemoveAppWindow(winBorder); RemoveAppWindow(winBorder);
} }
else if(feel == B_MODAL_ALL_WINDOW_FEEL || feel == B_FLOATING_ALL_WINDOW_FEEL else
if(feel == B_MODAL_ALL_WINDOW_FEEL || feel == B_FLOATING_ALL_WINDOW_FEEL
|| feel == B_SYSTEM_FIRST || feel == B_SYSTEM_LAST) || feel == B_SYSTEM_FIRST || feel == B_SYSTEM_LAST)
{ {
if(feel == B_MODAL_ALL_WINDOW_FEEL || feel == B_FLOATING_ALL_WINDOW_FEEL) if(feel == B_MODAL_ALL_WINDOW_FEEL || feel == B_FLOATING_ALL_WINDOW_FEEL)
@@ -374,16 +374,18 @@ void RootLayer::RemoveWinBorder(WinBorder* winBorder)
uint32 workspaces = winBorder->Window()->Workspaces(); uint32 workspaces = winBorder->Window()->Workspaces();
int32 count = WorkspaceCount(); int32 count = WorkspaceCount();
for( int32 i=0; i < 32 && i < count; i++) for( int32 i=0; i < 32 && i < count; i++)
{
if( workspaces & (0x00000001UL << i)) if( workspaces & (0x00000001UL << i))
WorkspaceAt(i+1)->RemoveLayerPtr(winBorder); WorkspaceAt(i+1)->RemoveLayerPtr(winBorder);
} }
}
RemoveChild(winBorder); RemoveChild(winBorder);
fMainLock.Unlock(); fMainLock.Unlock();
desktop->fGeneralLock.Unlock(); desktop->fGeneralLock.Unlock();
} }
//---------------------------------------------------------------------------
void RootLayer::ChangeWorkspacesFor(WinBorder* winBorder, uint32 newWorkspaces) void RootLayer::ChangeWorkspacesFor(WinBorder* winBorder, uint32 newWorkspaces)
{ {
// only normal windows are affected by this change // only normal windows are affected by this change
@@ -397,17 +399,19 @@ void RootLayer::ChangeWorkspacesFor(WinBorder* winBorder, uint32 newWorkspaces)
{ {
// do nothing. // do nothing.
} }
else if(oldWorkspaces & (0x00000001 << i)) else
if(oldWorkspaces & (0x00000001 << i))
{ {
WorkspaceAt(i+1)->RemoveLayerPtr(winBorder); WorkspaceAt(i+1)->RemoveLayerPtr(winBorder);
} }
else if (newWorkspaces & (0x00000001 << i)) else
if (newWorkspaces & (0x00000001 << i))
{ {
WorkspaceAt(i+1)->AddLayerPtr(winBorder); WorkspaceAt(i+1)->AddLayerPtr(winBorder);
} }
} }
} }
//---------------------------------------------------------------------------
bool RootLayer::SetFrontWinBorder(WinBorder* winBorder) bool RootLayer::SetFrontWinBorder(WinBorder* winBorder)
{ {
if(!winBorder) if(!winBorder)
@@ -436,11 +440,13 @@ bool RootLayer::SetFrontWinBorder(WinBorder* winBorder)
{ {
int32 i; int32 i;
for( i = 0; i < 32 && i < count; i++) for( i = 0; i < 32 && i < count; i++)
{
if( workspaces & (0x00000001UL << i)) if( workspaces & (0x00000001UL << i))
{ {
newWorkspace = i+1; newWorkspace = i+1;
break; break;
} }
}
if (i == count || i == 32) if (i == count || i == 32)
newWorkspace = ActiveWorkspaceIndex(); newWorkspace = ActiveWorkspaceIndex();
@@ -451,7 +457,8 @@ bool RootLayer::SetFrontWinBorder(WinBorder* winBorder)
WorkspaceAt(newWorkspace)->SetFrontLayer(winBorder); WorkspaceAt(newWorkspace)->SetFrontLayer(winBorder);
SetActiveWorkspaceByIndex(newWorkspace); SetActiveWorkspaceByIndex(newWorkspace);
} }
else{ else
{
ActiveWorkspace()->SetFrontLayer(winBorder); ActiveWorkspace()->SetFrontLayer(winBorder);
} }
@@ -460,7 +467,7 @@ bool RootLayer::SetFrontWinBorder(WinBorder* winBorder)
STRACE(("#RootLayer::SetFrontWinBorder(%s)\n", winBorder? winBorder->GetName():"NULL")); STRACE(("#RootLayer::SetFrontWinBorder(%s)\n", winBorder? winBorder->GetName():"NULL"));
return true; return true;
} }
//---------------------------------------------------------------------------
void RootLayer::SetScreens(Screen *screen[], int32 rows, int32 columns) void RootLayer::SetScreens(Screen *screen[], int32 rows, int32 columns)
{ {
// NOTE: All screens *must* have the same resolution // NOTE: All screens *must* have the same resolution
@@ -469,11 +476,13 @@ void RootLayer::SetScreens(Screen *screen[], int32 rows, int32 columns)
for (int32 i=0; i < rows; i++) for (int32 i=0; i < rows; i++)
{ {
if (i==0) if (i==0)
{
for(int32 j=0; j < columns; j++) for(int32 j=0; j < columns; j++)
{ {
fScreenPtrList.AddItem(screen[i*rows + j]); fScreenPtrList.AddItem(screen[i*rows + j]);
newFrame.right += screen[i*rows + j]->Resolution().x; newFrame.right += screen[i*rows + j]->Resolution().x;
} }
}
newFrame.bottom += screen[i*rows]->Resolution().y; newFrame.bottom += screen[i*rows]->Resolution().y;
} }
@@ -486,14 +495,15 @@ void RootLayer::SetScreens(Screen *screen[], int32 rows, int32 columns)
fScreenXResolution = (int32)(screen[0]->Resolution().x); fScreenXResolution = (int32)(screen[0]->Resolution().x);
fScreenYResolution = (int32)(screen[0]->Resolution().y); fScreenYResolution = (int32)(screen[0]->Resolution().y);
// NOTE: a RebuildFullRegion() followed by FullInvalidate() are required after calling this method! // NOTE: a RebuildFullRegion() followed by FullInvalidate() are required after calling
// this method!
} }
//---------------------------------------------------------------------------
Screen** RootLayer::Screens() Screen **RootLayer::Screens()
{ {
return (Screen**)fScreenPtrList.Items(); return (Screen**)fScreenPtrList.Items();
} }
//---------------------------------------------------------------------------
bool RootLayer::SetScreenResolution(int32 width, int32 height, uint32 colorspace) bool RootLayer::SetScreenResolution(int32 width, int32 height, uint32 colorspace)
{ {
if (fScreenXResolution == width && fScreenYResolution == height && if (fScreenXResolution == width && fScreenYResolution == height &&
@@ -529,7 +539,7 @@ bool RootLayer::SetScreenResolution(int32 width, int32 height, uint32 colorspace
return false; return false;
} }
//---------------------------------------------------------------------------
void RootLayer::SetWorkspaceCount(const int32 count) void RootLayer::SetWorkspaceCount(const int32 count)
{ {
STRACE(("*RootLayer::SetWorkspaceCount(%ld)\n", count)); STRACE(("*RootLayer::SetWorkspaceCount(%ld)\n", count));
@@ -586,12 +596,12 @@ void RootLayer::SetWorkspaceCount(const int32 count)
STRACE(("#RootLayer::SetWorkspaceCount(%ld)\n", count)); STRACE(("#RootLayer::SetWorkspaceCount(%ld)\n", count));
} }
//---------------------------------------------------------------------------
int32 RootLayer::WorkspaceCount() const int32 RootLayer::WorkspaceCount() const
{ {
return fWSPtrList.CountItems(); return fWSPtrList.CountItems();
} }
//---------------------------------------------------------------------------
Workspace* RootLayer::WorkspaceAt(const int32 index) const Workspace* RootLayer::WorkspaceAt(const int32 index) const
{ {
Workspace *ws = NULL; Workspace *ws = NULL;
@@ -599,7 +609,7 @@ Workspace* RootLayer::WorkspaceAt(const int32 index) const
return ws; return ws;
} }
//---------------------------------------------------------------------------
void RootLayer::SetActiveWorkspaceByIndex(const int32 index) void RootLayer::SetActiveWorkspaceByIndex(const int32 index)
{ {
Workspace *ws = NULL; Workspace *ws = NULL;
@@ -607,7 +617,7 @@ void RootLayer::SetActiveWorkspaceByIndex(const int32 index)
if (ws) if (ws)
SetActiveWorkspace(ws); SetActiveWorkspace(ws);
} }
//---------------------------------------------------------------------------
void RootLayer::SetActiveWorkspace(Workspace *ws) void RootLayer::SetActiveWorkspace(Workspace *ws)
{ {
if (fActiveWorkspace == ws || !ws) if (fActiveWorkspace == ws || !ws)
@@ -618,19 +628,19 @@ void RootLayer::SetActiveWorkspace(Workspace *ws)
// RebuildRegions(Frame()); // RebuildRegions(Frame());
// Invalidate(Frame()); // Invalidate(Frame());
} }
//---------------------------------------------------------------------------
int32 RootLayer::ActiveWorkspaceIndex() const{ int32 RootLayer::ActiveWorkspaceIndex() const{
if (fActiveWorkspace) if (fActiveWorkspace)
return fActiveWorkspace->ID(); return fActiveWorkspace->ID();
else else
return -1; return -1;
} }
//---------------------------------------------------------------------------
Workspace* RootLayer::ActiveWorkspace() const Workspace* RootLayer::ActiveWorkspace() const
{ {
return fActiveWorkspace; return fActiveWorkspace;
} }
//---------------------------------------------------------------------------
void RootLayer::SetBGColor(const RGBColor &col) void RootLayer::SetBGColor(const RGBColor &col)
{ {
ActiveWorkspace()->SetBGColor(col); ActiveWorkspace()->SetBGColor(col);
@@ -639,12 +649,12 @@ void RootLayer::SetBGColor(const RGBColor &col)
// Invalidate(Frame()); // Invalidate(Frame());
} }
//---------------------------------------------------------------------------
RGBColor RootLayer::BGColor(void) const RGBColor RootLayer::BGColor(void) const
{ {
return _layerdata->viewcolor; return _layerdata->viewcolor;
} }
//---------------------------------------------------------------------------
void RootLayer::RemoveAppWindow(WinBorder *wb) void RootLayer::RemoveAppWindow(WinBorder *wb)
{ {
wb->Window()->App()->fAppFMWList.RemoveItem(wb); wb->Window()->App()->fAppFMWList.RemoveItem(wb);
@@ -653,7 +663,7 @@ void RootLayer::RemoveAppWindow(WinBorder *wb)
for(int32 i=0; i < count; i++) for(int32 i=0; i < count; i++)
WorkspaceAt(i+1)->RemoveLayerPtr(wb); WorkspaceAt(i+1)->RemoveLayerPtr(wb);
} }
//---------------------------------------------------------------------------
void RootLayer::PrintToStream() void RootLayer::PrintToStream()
{ {
printf("\nRootLayer '%s' internals:\n", GetName()); printf("\nRootLayer '%s' internals:\n", GetName());
@@ -671,5 +681,4 @@ void RootLayer::PrintToStream()
printf("~~~~~~~~\n"); printf("~~~~~~~~\n");
} }
printf("Active Workspace: %ld\n", fActiveWorkspace? fActiveWorkspace->ID(): -1); printf("Active Workspace: %ld\n", fActiveWorkspace? fActiveWorkspace->ID(): -1);
} }
+22 -21
View File
@@ -52,51 +52,52 @@ class DisplayDriver;
class RootLayer : public Layer class RootLayer : public Layer
{ {
public: public:
RootLayer(const char *name, RootLayer(const char *name, int32 workspaceCount, Desktop *desktop,
int32 workspaceCount, Desktop *desktop, DisplayDriver *driver); DisplayDriver *driver);
virtual ~RootLayer(); virtual ~RootLayer(void);
virtual void Draw(const BRect &r); virtual void Draw(const BRect &r);
virtual void MoveBy(float x, float y); virtual void MoveBy(float x, float y);
virtual void ResizeBy(float x, float y); virtual void ResizeBy(float x, float y);
virtual Layer* VirtualTopChild() const; // // For the active workspaces
virtual Layer* VirtualLowerSibling() const; // ... for the active workspace virtual Layer *VirtualTopChild(void) const;
virtual Layer* VirtualUpperSibling() const; // virtual Layer *VirtualLowerSibling(void) const;
virtual Layer* VirtualBottomChild() const; // virtual Layer *VirtualUpperSibling(void) const;
virtual Layer *VirtualBottomChild(void) const;
void AddWinBorder(WinBorder* winBorder); void AddWinBorder(WinBorder *winBorder);
void RemoveWinBorder(WinBorder* winBorder); void RemoveWinBorder(WinBorder *winBorder);
void ChangeWorkspacesFor(WinBorder* winBorder, uint32 newWorkspaces); void ChangeWorkspacesFor(WinBorder *winBorder, uint32 newWorkspaces);
bool SetFrontWinBorder(WinBorder* winBorder); bool SetFrontWinBorder(WinBorder *winBorder);
void SetScreens(Screen *screen[], int32 rows, int32 columns); void SetScreens(Screen *screen[], int32 rows, int32 columns);
Screen** Screens(); Screen **Screens(void);
bool SetScreenResolution(int32 width, int32 height, uint32 colorspace); bool SetScreenResolution(int32 width, int32 height, uint32 colorspace);
int32 ScreenRows() const { return fRows; } int32 ScreenRows(void) const { return fRows; }
int32 ScreenColumns() const { return fColumns; } int32 ScreenColumns(void) const { return fColumns; }
void SetWorkspaceCount(const int32 count); void SetWorkspaceCount(const int32 count);
int32 WorkspaceCount(void) const; int32 WorkspaceCount(void) const;
Workspace* WorkspaceAt(const int32 index) const; Workspace *WorkspaceAt(const int32 index) const;
void SetActiveWorkspaceByIndex(const int32 index); void SetActiveWorkspaceByIndex(const int32 index);
void SetActiveWorkspace(Workspace *ws); void SetActiveWorkspace(Workspace *ws);
int32 ActiveWorkspaceIndex(void) const; int32 ActiveWorkspaceIndex(void) const;
Workspace* ActiveWorkspace(void) const; Workspace *ActiveWorkspace(void) const;
void SetBGColor(const RGBColor &col); void SetBGColor(const RGBColor &col);
RGBColor BGColor(void) const; RGBColor BGColor(void) const;
void AddWinBorderToWorkspaces(WinBorder* winBorder, void AddWinBorderToWorkspaces(WinBorder *winBorder, uint32 wks);
uint32 wks);
// ------- debugging methods ------- void PrintToStream(void);
void PrintToStream();
// "Private" to app_server :-) - they should not be used // "Private" to app_server :-) - they should not be used
void RemoveAppWindow(WinBorder *wb); void RemoveAppWindow(WinBorder *wb);
FMWList fMainFMWList; FMWList fMainFMWList;
BLocker fMainLock; BLocker fMainLock;
private: private:
Desktop *fDesktop; Desktop *fDesktop;
File diff suppressed because it is too large Load Diff
+32 -52
View File
@@ -65,17 +65,9 @@ class Layer;
class ServerWindow class ServerWindow
{ {
public: public:
ServerWindow( BRect rect, ServerWindow(BRect rect, const char *string, uint32 wlook, uint32 wfeel, uint32 wflags,
const char *string, ServerApp *winapp, port_id winport, port_id looperPort, port_id replyport,
uint32 wlook, uint32 index,int32 handlerID);
uint32 wfeel,
uint32 wflags,
ServerApp *winapp,
port_id winport,
port_id looperPort,
port_id replyport,
uint32 index,
int32 handlerID);
virtual ~ServerWindow(void); virtual ~ServerWindow(void);
void Init(); void Init();
@@ -103,57 +95,43 @@ public:
status_t Lock(void); status_t Lock(void);
void Unlock(void); void Unlock(void);
bool IsLocked(void); bool IsLocked(void);
thread_id ThreadID(void) const thread_id ThreadID(void) const { return fMonitorThreadID;}
{ return fMonitorThreadID;}
void DispatchMessage(int32 code); void DispatchMessage(int32 code);
void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer); void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer);
static int32 MonitorWin(void *data); static int32 MonitorWin(void *data);
static void HandleMouseEvent(PortMessage *msg);
static void HandleKeyEvent(int32 code, int8 *buffer);
void PostMessage(int32 code, size_t size=0, int8 *buffer=NULL); void PostMessage(int32 code, size_t size=0, int8 *buffer=NULL);
//! Returns the index of the workspaces to which it belongs //! Returns the index of the workspaces to which it belongs
int32 GetWorkspaceIndex(void) int32 GetWorkspaceIndex(void) { return fWorkspaces; }
{ return fWorkspaces; } Workspace *GetWorkspace(void);
Workspace* GetWorkspace(void);
void SetWorkspace(Workspace *wkspc); void SetWorkspace(Workspace *wkspc);
//! Returns the window's title //! Returns the window's title
const char* Title(void) const char *Title(void) { return fTitle.String(); }
{ return fTitle.String(); }
Layer* CreateLayerTree(Layer *localRoot); Layer *CreateLayerTree(Layer *localRoot);
void SetLayerState(Layer *layer); void SetLayerState(Layer *layer);
void SetLayerFontState(Layer *layer); void SetLayerFontState(Layer *layer);
Layer* FindLayer(const Layer* start, int32 token) const; Layer *FindLayer(const Layer *start, int32 token) const;
void SendMessageToClient( const BMessage* msg ) const; void SendMessageToClient( const BMessage *msg ) const;
int32 Look(void) const int32 Look(void) const { return fLook; }
{ return fLook; } int32 Feel(void) const { return fFeel; }
int32 Feel(void) const uint32 Flags(void) const { return fFlags; }
{ return fFeel; } team_id ClientTeamID(void) const { return fClientTeamID; }
uint32 Flags(void) const ServerApp *App(void) const { return fServerApp; }
{ return fFlags; } uint32 Workspaces(void) const { return fWorkspaces; }
team_id ClientTeamID(void) const WinBorder *GetWinBorder(void) const { return fWinBorder; }
{ return fClientTeamID; }
ServerApp* App(void) const
{ return fServerApp; }
uint32 Workspaces(void) const
{ return fWorkspaces; }
WinBorder* GetWinBorder(void) const
{ return fWinBorder; }
// server "private" - try not to use // server "private" - try not to use
void QuietlySetWorkspaces(uint32 wks) void QuietlySetWorkspaces(uint32 wks) { fWorkspaces = wks; }
{ fWorkspaces = wks; } void QuietlySetFeel(int32 feel) { fFeel = feel; }
void QuietlySetFeel(int32 feel) int32 ClientToken(void) const { return fHandlerToken; }
{ fFeel = feel; }
int32 ClientToken(void) const
{ return fHandlerToken; }
FMWList fWinFMWList; FMWList fWinFMWList;
protected: protected:
friend class ServerApp; friend class ServerApp;
friend class WinBorder; friend class WinBorder;
@@ -161,15 +139,15 @@ protected:
friend class Layer; friend class Layer;
BString fTitle; BString fTitle;
int32 fLook, int32 fLook;
fFeel, int32 fFeel;
fFlags; int32 fFlags;
uint32 fWorkspaces; uint32 fWorkspaces;
Workspace* fWorkspace; Workspace *fWorkspace;
bool fIsActive; bool fIsActive;
ServerApp* fServerApp; ServerApp *fServerApp;
WinBorder* fWinBorder; WinBorder *fWinBorder;
team_id fClientTeamID; team_id fClientTeamID;
thread_id fMonitorThreadID; thread_id fMonitorThreadID;
@@ -183,9 +161,11 @@ protected:
uint32 fToken; uint32 fToken;
int32 fHandlerToken; int32 fHandlerToken;
BSession* fSession; BSession *fSession;
Layer* fTopLayer; Layer *fTopLayer;
Layer* cl; // short for currentLayer. We'll use it a lot, that's why it's short :-)
// cl is short for currentLayer. We'll use it a lot, that's why it's short :-)
Layer *cl;
}; };
#endif #endif