Janitorial work -- mostly moving style closer to OT guidelines

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7912 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm 2004-06-11 18:21:57 +00:00
parent e27f9449fe
commit 4f4af1fe79
8 changed files with 1129 additions and 967 deletions

View File

@ -255,7 +255,7 @@ void Desktop::AddWinBorder(WinBorder* winBorder)
return;
// special case for Tracker background window.
if (winBorder->_level == B_SYSTEM_LAST)
if (winBorder->fLevel == B_SYSTEM_LAST)
{
// it's added in all RottLayers
for(int32 i=0; i<fRootLayerList.CountItems(); i++)
@ -277,7 +277,7 @@ void Desktop::AddWinBorder(WinBorder* winBorder)
void Desktop::RemoveWinBorder(WinBorder* winBorder)
{
if(winBorder->_level == B_SYSTEM_LAST)
if(winBorder->fLevel == B_SYSTEM_LAST)
{
for(int32 i=0; i<fRootLayerList.CountItems(); i++)
((RootLayer*)fRootLayerList.ItemAt(i))->RemoveWinBorder(winBorder);
@ -835,7 +835,7 @@ void Desktop::RemoveSubsetWindow(WinBorder* wb)
for(int32 i=0; i < count; i++)
{
winBorder = static_cast<WinBorder*>(fWinBorderList.ItemAt(i));
if (winBorder->_level == B_NORMAL_FEEL)
if (winBorder->fLevel == B_NORMAL_FEEL)
winBorder->Window()->fWinFMWList.RemoveItem(wb);
}
fLayerLock.Unlock();

File diff suppressed because it is too large Load Diff

View File

@ -12,89 +12,84 @@
class ServerWindow;
class RootLayer;
//class MyDriver;
class DisplayDriver;
class LayerData;
class Layer
{
public:
Layer(BRect frame, const char *name, int32 token, uint32 resize,
uint32 flags, DisplayDriver *driver);
virtual ~Layer(void);
Layer(BRect frame, const char *name, int32 token, uint32 resize,
uint32 flags, DisplayDriver *driver);
virtual ~Layer(void);
void AddChild(Layer *child, RootLayer *rootLayer = NULL);
void RemoveChild(Layer *child);
void RemoveSelf();
bool HasChild(Layer* layer);
RootLayer* GetRootLayer() const { return fRootLayer; }
uint32 CountChildren(void) const;
Layer* FindLayer(const int32 token);
Layer* LayerAt(const BPoint &pt);
bool IsTopLayer() { return fIsTopLayer; }
virtual Layer* VirtualTopChild() const;
virtual Layer* VirtualLowerSibling() const;
virtual Layer* VirtualUpperSibling() const;
virtual Layer* VirtualBottomChild() const;
const char* GetName(void) const { return (_name)?_name->String():NULL; }
void AddChild(Layer *child, RootLayer *rootLayer = NULL);
void RemoveChild(Layer *child);
void RemoveSelf(void);
bool HasChild(Layer *layer);
RootLayer *GetRootLayer(void) const { return fRootLayer; }
uint32 CountChildren(void) const;
Layer *FindLayer(const int32 token);
Layer *LayerAt(const BPoint &pt);
bool IsTopLayer(void) { return fIsTopLayer; }
virtual Layer *VirtualTopChild(void) const;
virtual Layer *VirtualLowerSibling(void) const;
virtual Layer *VirtualUpperSibling(void) const;
virtual Layer *VirtualBottomChild(void) const;
const char *GetName(void) const { return (fName)?fName->String():NULL; }
void FullInvalidate(const BRect &rect);
void FullInvalidate(const BRegion &region);
void Invalidate(const BRegion &region);
virtual void RebuildFullRegion(void);
void StartRebuildRegions( const BRegion& reg, Layer *target, uint32 action, BPoint& pt);
void RebuildRegions( const BRegion& reg, uint32 action, BPoint pt, BPoint ptOffset);
uint32 ResizeOthers(float x, float y, BPoint coords[], BPoint *ptOffset);
void Redraw(const BRegion& reg, Layer *startFrom=NULL);
void EmptyGlobals(void);
virtual void Draw(const BRect &r);
void SendViewMovedMsg(void);
void SendViewResizedMsg(void);
virtual void Show(bool invalidate=true);
virtual void Hide(bool invalidate=true);
bool IsHidden(void) const;
BRect Bounds(void) const;
BRect Frame(void) const;
virtual void MoveBy(float x, float y);
virtual void ResizeBy(float x, float y);
BRect ConvertToParent(BRect rect);
BRegion ConvertToParent(BRegion *reg);
BRect ConvertFromParent(BRect rect);
BRegion ConvertFromParent(BRegion *reg);
BRegion ConvertToTop(BRegion *reg);
BRect ConvertToTop(BRect rect);
BRegion ConvertFromTop(BRegion *reg);
BRect ConvertFromTop(BRect rect);
DisplayDriver *GetDisplayDriver(void) const { return fDriver; }
void PruneTree(void);
void PrintToStream(void);
void PrintNode(void);
void PrintTree(void);
void FullInvalidate(const BRect &rect);
void FullInvalidate(const BRegion &region);
void Invalidate(const BRegion &region);
virtual void RebuildFullRegion(void);
void StartRebuildRegions( const BRegion& reg, Layer *target, uint32 action, BPoint& pt);
void RebuildRegions( const BRegion& reg, uint32 action, BPoint pt, BPoint ptOffset);
uint32 ResizeOthers(float x, float y, BPoint coords[], BPoint *ptOffset);
void Redraw(const BRegion& reg, Layer *startFrom=NULL);
void EmptyGlobals();
virtual void Draw(const BRect &r);
void SendViewMovedMsg();
void SendViewResizedMsg();
virtual void Show(void);
virtual void Hide(void);
bool IsHidden(void) const;
BRect Bounds(void) const;
BRect Frame(void) const;
virtual void MoveBy(float x, float y);
virtual void ResizeBy(float x, float y);
BRect ConvertToParent(BRect rect);
BRegion ConvertToParent(BRegion *reg);
BRect ConvertFromParent(BRect rect);
BRegion ConvertFromParent(BRegion *reg);
BRegion ConvertToTop(BRegion *reg);
BRect ConvertToTop(BRect rect);
BRegion ConvertFromTop(BRegion *reg);
BRect ConvertFromTop(BRect rect);
DisplayDriver* GetDisplayDriver() const { return fDriver; }
void PruneTree(void);
void PrintToStream(void);
void PrintNode(void);
void PrintTree();
// server "private" - should not be used
void SetRootLayer(RootLayer* rl){ fRootLayer = rl; }
void SetServerWindow(ServerWindow *win);
void SetAsTopLayer(bool option) { fIsTopLayer = option; }
private:
void RequestClientUpdate(const BRegion &reg, Layer *startFrom);
void RequestDraw(const BRegion &reg, Layer *startFrom, bool redraw=false);
ServerWindow* SearchForServerWindow() const;
void SetRootLayer(RootLayer *rl){ fRootLayer = rl; }
void SetServerWindow(ServerWindow *win);
void SetAsTopLayer(bool option) { fIsTopLayer = option; }
protected:
friend class RootLayer;
@ -104,39 +99,45 @@ protected:
friend class Desktop;
friend class Workspace;
BRect _frame;
BPoint _boundsLeftTop;
Layer *_parent,
*_uppersibling,
*_lowersibling,
*_topchild,
*_bottomchild;
BRect fFrame;
BPoint fBoundsLeftTop;
Layer *fParent;
Layer *fUpperSibling;
Layer *fLowerSibling;
Layer *fTopChild;
Layer *fBottomChild;
mutable Layer *fCurrent;
BRegion fVisible;
BRegion fFullVisible;
BRegion fFull;
BRegion fUpdateReg;
BRegion *clipToPicture;
bool clipToPictureInverse;
ServerWindow *fServerWin;
BString *fName;
int32 fViewToken;
int32 fLevel;
uint32 fFlags;
uint32 fResizeMode;
bool fHidden;
bool fIsUpdating;
bool fIsTopLayer;
DisplayDriver *fDriver;
LayerData *fLayerData;
//RGBColor fBackColor;
RootLayer *fRootLayer;
mutable Layer *fCurrent;
private:
void RequestClientUpdate(const BRegion &reg, Layer *startFrom);
void RequestDraw(const BRegion &reg, Layer *startFrom, bool redraw=false);
ServerWindow *SearchForServerWindow(void) const;
BRegion _visible,
_fullVisible,
_full,
fUpdateReg;
BRegion *clipToPicture;
bool clipToPictureInverse;
ServerWindow *_serverwin;
BString *_name;
int32 _view_token;
int32 _level;
uint32 _flags;
uint32 _resize_mode;
bool _hidden;
bool _is_updating;
bool fIsTopLayer;
DisplayDriver *fDriver;
LayerData *_layerdata;
// RGBColor fBackColor;
RootLayer* fRootLayer;
};
#endif

View File

@ -71,8 +71,8 @@ RootLayer::RootLayer(const char *name, int32 workspaceCount,
fScreenYResolution = 0;
fColorSpace = B_RGB32;
_view_token = 0; // is this used for WinBorders?
_hidden = false;
fViewToken = 0; // is this used for WinBorders?
fHidden = false;
SetWorkspaceCount(workspaceCount);
}
@ -133,28 +133,28 @@ void RootLayer::Draw(const BRect &r)
polygon[5].x = 200;
polygon[5].y = 200;
_layerdata->highcolor.SetColor(255,0,0,255);
_layerdata->lowcolor.SetColor(255,255,255,255);
_driver->FillRect(r1,_layerdata,pattern);
fLayerData->highcolor.SetColor(255,0,0,255);
fLayerData->lowcolor.SetColor(255,255,255,255);
_driver->FillRect(r1,fLayerData,pattern);
_layerdata->highcolor.SetColor(255,255,0,255);
_driver->StrokeLine(BPoint(100,100),BPoint(1500,1100),_layerdata,pattern);
fLayerData->highcolor.SetColor(255,255,0,255);
_driver->StrokeLine(BPoint(100,100),BPoint(1500,1100),fLayerData,pattern);
_layerdata->highcolor.SetColor(0,0,255,255);
_driver->StrokeBezier(pts,_layerdata,pattern);
_driver->StrokeArc(BRect(200,300,400,600),30,270,_layerdata,pattern);
_driver->StrokeEllipse(BRect(200,700,400,900),_layerdata,pattern);
_driver->StrokeRect(BRect(650,1000,750,1090),_layerdata,pattern);
_driver->StrokeRoundRect(BRect(200,1000,600,1090),30,40,_layerdata,pattern);
// _driver->StrokePolygon(polygon,6,polygonRect,_layerdata,pattern);
// _driver->StrokeTriangle(triangle,triangleRect,_layerdata,pattern);
_layerdata->highcolor.SetColor(255,0,255,255);
_driver->FillArc(BRect(1250,300,1450,600),30,270,_layerdata,pattern);
// _driver->FillBezier(pts,_layerdata,pattern);
_driver->FillEllipse(BRect(800,300,1200,600),_layerdata,pattern);
_driver->FillRoundRect(BRect(800,1000,1200,1090),30,40,_layerdata,pattern2);
_driver->FillPolygon(polygon,6,polygonRect,_layerdata,pattern);
// _driver->FillTriangle(triangle,triangleRect,_layerdata,pattern);
fLayerData->highcolor.SetColor(0,0,255,255);
_driver->StrokeBezier(pts,fLayerData,pattern);
_driver->StrokeArc(BRect(200,300,400,600),30,270,fLayerData,pattern);
_driver->StrokeEllipse(BRect(200,700,400,900),fLayerData,pattern);
_driver->StrokeRect(BRect(650,1000,750,1090),fLayerData,pattern);
_driver->StrokeRoundRect(BRect(200,1000,600,1090),30,40,fLayerData,pattern);
// _driver->StrokePolygon(polygon,6,polygonRect,fLayerData,pattern);
// _driver->StrokeTriangle(triangle,triangleRect,fLayerData,pattern);
fLayerData->highcolor.SetColor(255,0,255,255);
_driver->FillArc(BRect(1250,300,1450,600),30,270,fLayerData,pattern);
// _driver->FillBezier(pts,fLayerData,pattern);
_driver->FillEllipse(BRect(800,300,1200,600),fLayerData,pattern);
_driver->FillRoundRect(BRect(800,1000,1200,1090),30,40,fLayerData,pattern2);
_driver->FillPolygon(polygon,6,polygonRect,fLayerData,pattern);
// _driver->FillTriangle(triangle,triangleRect,fLayerData,pattern);
#endif // end DISPLAYDRIVER_TEST_HACK
@ -389,7 +389,7 @@ void RootLayer::RemoveWinBorder(WinBorder* winBorder)
void RootLayer::ChangeWorkspacesFor(WinBorder* winBorder, uint32 newWorkspaces)
{
// only normal windows are affected by this change
if(!winBorder->_level != B_NORMAL_FEEL)
if(!winBorder->fLevel != B_NORMAL_FEEL)
return;
uint32 oldWorkspaces = winBorder->Window()->Workspaces();
@ -489,7 +489,7 @@ void RootLayer::SetScreens(Screen *screen[], int32 rows, int32 columns)
newFrame.right -= 1;
newFrame.bottom -= 1;
_frame = newFrame;
fFrame = newFrame;
fRows = rows;
fColumns = columns;
fScreenXResolution = (int32)(screen[0]->Resolution().x);
@ -645,14 +645,14 @@ void RootLayer::SetBGColor(const RGBColor &col)
{
ActiveWorkspace()->SetBGColor(col);
_layerdata->viewcolor = col;
fLayerData->viewcolor = col;
// Invalidate(Frame());
}
RGBColor RootLayer::BGColor(void) const
{
return _layerdata->viewcolor;
return fLayerData->viewcolor;
}
void RootLayer::RemoveAppWindow(WinBorder *wb)

View File

@ -287,8 +287,8 @@ void ServerWindow::Show(void)
rl->fMainLock.Lock();
STRACE(("ServerWindow(%s)::Show() - Main lock acquired\n", fWinBorder->GetName()));
// manually set fWinBorder->_hidden to false because Layer's version also calls FullInvalidate.
fWinBorder->_hidden=false;
// manually set fWinBorder->fHidden to false because Layer's version also calls FullInvalidate.
fWinBorder->fHidden=false;
if ( (fFeel == B_FLOATING_SUBSET_WINDOW_FEEL || fFeel == B_MODAL_SUBSET_WINDOW_FEEL)
&& fWinBorder->MainWinBorder() == NULL)
@ -578,56 +578,56 @@ void ServerWindow::SetLayerFontState(Layer *layer)
// TODO: implement later. Currently there is no SetFamAndStyle(uint32)
// in ServerFont class. DW, could you add one?
//layer->_layerdata->font->
//layer->fLayerData->font->
}
if (mask & B_FONT_SIZE)
{
float size;
fSession->ReadFloat(&size);
layer->_layerdata->font.SetSize(size);
layer->fLayerData->font.SetSize(size);
}
if (mask & B_FONT_SHEAR)
{
float shear;
fSession->ReadFloat(&shear);
layer->_layerdata->font.SetShear(shear);
layer->fLayerData->font.SetShear(shear);
}
if (mask & B_FONT_ROTATION)
{
float rotation;
fSession->ReadFloat(&rotation);
layer->_layerdata->font.SetRotation(rotation);
layer->fLayerData->font.SetRotation(rotation);
}
if (mask & B_FONT_SPACING)
{
uint8 spacing;
fSession->ReadUInt8(&spacing);
layer->_layerdata->font.SetSpacing(spacing);
layer->fLayerData->font.SetSpacing(spacing);
}
if (mask & B_FONT_ENCODING)
{
uint8 encoding;
fSession->ReadUInt8((uint8*)&encoding);
layer->_layerdata->font.SetEncoding(encoding);
layer->fLayerData->font.SetEncoding(encoding);
}
if (mask & B_FONT_FACE)
{
uint16 face;
fSession->ReadUInt16(&face);
layer->_layerdata->font.SetFace(face);
layer->fLayerData->font.SetFace(face);
}
if (mask & B_FONT_FLAGS)
{
uint32 flags;
fSession->ReadUInt32(&flags);
layer->_layerdata->font.SetFlags(flags);
layer->fLayerData->font.SetFlags(flags);
}
STRACE(("DONE: ServerWindow %s: Message AS_LAYER_SET_FONT_STATE: Layer: %s\n",
fTitle.String(), layer->_name->String()));
@ -639,49 +639,49 @@ void ServerWindow::SetLayerState(Layer *layer)
pattern patt;
int32 clipRegRects;
fSession->ReadPoint( &(layer->_layerdata->penlocation));
fSession->ReadFloat( &(layer->_layerdata->pensize));
fSession->ReadPoint( &(layer->fLayerData->penlocation));
fSession->ReadFloat( &(layer->fLayerData->pensize));
fSession->ReadData( &highColor, sizeof(rgb_color));
fSession->ReadData( &lowColor, sizeof(rgb_color));
fSession->ReadData( &viewColor, sizeof(rgb_color));
fSession->ReadData( &patt, sizeof(pattern));
fSession->ReadInt8((int8*) &(layer->_layerdata->draw_mode));
fSession->ReadPoint( &(layer->_layerdata->coordOrigin));
fSession->ReadInt8((int8*) &(layer->_layerdata->lineJoin));
fSession->ReadInt8((int8*) &(layer->_layerdata->lineCap));
fSession->ReadFloat( &(layer->_layerdata->miterLimit));
fSession->ReadInt8((int8*) &(layer->_layerdata->alphaSrcMode));
fSession->ReadInt8((int8*) &(layer->_layerdata->alphaFncMode));
fSession->ReadFloat( &(layer->_layerdata->scale));
fSession->ReadBool( &(layer->_layerdata->fontAliasing));
fSession->ReadInt8((int8*) &(layer->fLayerData->draw_mode));
fSession->ReadPoint( &(layer->fLayerData->coordOrigin));
fSession->ReadInt8((int8*) &(layer->fLayerData->lineJoin));
fSession->ReadInt8((int8*) &(layer->fLayerData->lineCap));
fSession->ReadFloat( &(layer->fLayerData->miterLimit));
fSession->ReadInt8((int8*) &(layer->fLayerData->alphaSrcMode));
fSession->ReadInt8((int8*) &(layer->fLayerData->alphaFncMode));
fSession->ReadFloat( &(layer->fLayerData->scale));
fSession->ReadBool( &(layer->fLayerData->fontAliasing));
fSession->ReadInt32( &clipRegRects);
layer->_layerdata->patt.Set(*((uint64*)&patt));
layer->_layerdata->highcolor.SetColor(highColor);
layer->_layerdata->lowcolor.SetColor(lowColor);
layer->_layerdata->viewcolor.SetColor(viewColor);
layer->fLayerData->patt.Set(*((uint64*)&patt));
layer->fLayerData->highcolor.SetColor(highColor);
layer->fLayerData->lowcolor.SetColor(lowColor);
layer->fLayerData->viewcolor.SetColor(viewColor);
if(clipRegRects != 0)
{
if(layer->_layerdata->clipReg == NULL)
layer->_layerdata->clipReg = new BRegion();
if(layer->fLayerData->clipReg == NULL)
layer->fLayerData->clipReg = new BRegion();
else
layer->_layerdata->clipReg->MakeEmpty();
layer->fLayerData->clipReg->MakeEmpty();
BRect rect;
for(int32 i = 0; i < clipRegRects; i++)
{
fSession->ReadRect(&rect);
layer->_layerdata->clipReg->Include(rect);
layer->fLayerData->clipReg->Include(rect);
}
}
else
{
if (layer->_layerdata->clipReg)
if (layer->fLayerData->clipReg)
{
delete layer->_layerdata->clipReg;
layer->_layerdata->clipReg = NULL;
delete layer->fLayerData->clipReg;
layer->fLayerData->clipReg = NULL;
}
}
STRACE(("DONE: ServerWindow %s: Message AS_LAYER_SET_STATE: Layer: %s\n",fTitle.String(),
@ -714,7 +714,7 @@ Layer * ServerWindow::CreateLayerTree(Layer *localRoot)
delete name;
// there is no way of setting this, other than manually :-)
newLayer->_hidden = hidden;
newLayer->fHidden = hidden;
int32 dummyMsg;
@ -771,11 +771,11 @@ void ServerWindow::DispatchMessage(int32 code)
BRegion region;
src = sbmp->Bounds();
dst = cl->_parent->ConvertFromParent(cl->_full.Frame());
region = cl->_parent->ConvertFromParent(&(cl->_full));
dst = cl->fParent->ConvertFromParent(cl->fFull.Frame());
region = cl->fParent->ConvertFromParent(&(cl->fFull));
dst.OffsetBy(point);
cl->fDriver->DrawBitmap(&region, sbmp, src, dst, cl->_layerdata);
cl->fDriver->DrawBitmap(&region, sbmp, src, dst, cl->fLayerData);
}
// TODO: Adi -- shouldn't this sync with the client?
@ -796,11 +796,11 @@ void ServerWindow::DispatchMessage(int32 code)
BRegion region;
src = sbmp->Bounds();
dst = cl->_parent->ConvertFromParent(cl->_full.Frame());
region = cl->_parent->ConvertFromParent(&(cl->_full));
dst = cl->fParent->ConvertFromParent(cl->fFull.Frame());
region = cl->fParent->ConvertFromParent(&(cl->fFull));
dst.OffsetBy(point);
cl->fDriver->DrawBitmap(&region, sbmp, src, dst, cl->_layerdata);
cl->fDriver->DrawBitmap(&region, sbmp, src, dst, cl->fLayerData);
}
break;
}
@ -818,11 +818,11 @@ void ServerWindow::DispatchMessage(int32 code)
{
BRegion region;
BRect dst;
region = cl->_parent->ConvertFromParent(&(cl->_full));
dst = cl->_parent->ConvertFromParent(cl->_full.Frame());
region = cl->fParent->ConvertFromParent(&(cl->fFull));
dst = cl->fParent->ConvertFromParent(cl->fFull.Frame());
dstRect.OffsetBy(dst.left, dst.top);
cl->fDriver->DrawBitmap(&region, sbmp, srcRect, dstRect, cl->_layerdata);
cl->fDriver->DrawBitmap(&region, sbmp, srcRect, dstRect, cl->fLayerData);
}
// TODO: Adi -- shouldn't this sync with the client?
@ -842,11 +842,11 @@ void ServerWindow::DispatchMessage(int32 code)
{
BRegion region;
BRect dst;
region = cl->_parent->ConvertFromParent(&(cl->_full));
dst = cl->_parent->ConvertFromParent(cl->_full.Frame());
region = cl->fParent->ConvertFromParent(&(cl->fFull));
dst = cl->fParent->ConvertFromParent(cl->fFull.Frame());
dstRect.OffsetBy(dst.left, dst.top);
cl->fDriver->DrawBitmap(&region, sbmp, srcRect, dstRect, cl->_layerdata);
cl->fDriver->DrawBitmap(&region, sbmp, srcRect, dstRect, cl->fLayerData);
}
break;
}
@ -880,7 +880,7 @@ void ServerWindow::DispatchMessage(int32 code)
STRACE(("ServerWindow %s: AS_LAYER_DELETE(self)...\n", fTitle.String()));
Layer *parent;
parent = cl->_parent;
parent = cl->fParent;
// here we remove current layer from list.
cl->RemoveSelf();
@ -917,7 +917,7 @@ void ServerWindow::DispatchMessage(int32 code)
rgb_color hc, lc, vc; // high, low and view colors
uint64 patt; // current pattern as a uint64
ld = cl->_layerdata; // now we write fewer characters. :-)
ld = cl->fLayerData; // now we write fewer characters. :-)
hc = ld->highcolor.GetColor32();
lc = ld->lowcolor.GetColor32();
vc = ld->viewcolor.GetColor32();
@ -959,9 +959,9 @@ void ServerWindow::DispatchMessage(int32 code)
for(int i = 0; i < noOfRects; i++)
fSession->WriteRect(ld->clipReg->RectAt(i));
fSession->WriteFloat(cl->_frame.left);
fSession->WriteFloat(cl->_frame.top);
fSession->WriteRect(cl->_frame.OffsetToCopy(cl->_boundsLeftTop));
fSession->WriteFloat(cl->fFrame.left);
fSession->WriteFloat(cl->fFrame.top);
fSession->WriteRect(cl->fFrame.OffsetToCopy(cl->fBoundsLeftTop));
fSession->Sync();
STRACE(("ServerWindow %s: Message AS_LAYER_GET_STATE: Layer: %s\n",fTitle.String(), cl->_name->String()));
@ -994,9 +994,9 @@ void ServerWindow::DispatchMessage(int32 code)
}
case AS_LAYER_GET_COORD:
{
fSession->WriteFloat(cl->_frame.left);
fSession->WriteFloat(cl->_frame.top);
fSession->WriteRect(cl->_frame.OffsetToCopy(cl->_boundsLeftTop));
fSession->WriteFloat(cl->fFrame.left);
fSession->WriteFloat(cl->fFrame.top);
fSession->WriteRect(cl->fFrame.OffsetToCopy(cl->fBoundsLeftTop));
fSession->Sync();
STRACE(("ServerWindow %s: Message AS_LAYER_GET_COORD: Layer: %s\n",fTitle.String(), cl->_name->String()));
@ -1009,14 +1009,14 @@ void ServerWindow::DispatchMessage(int32 code)
fSession->ReadFloat(&x);
fSession->ReadFloat(&y);
cl->_layerdata->coordOrigin.Set(x, y);
cl->fLayerData->coordOrigin.Set(x, y);
STRACE(("ServerWindow %s: Message AS_LAYER_SET_ORIGIN: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
}
case AS_LAYER_GET_ORIGIN:
{
fSession->WritePoint(cl->_layerdata->coordOrigin);
fSession->WritePoint(cl->fLayerData->coordOrigin);
fSession->Sync();
STRACE(("ServerWindow %s: Message AS_LAYER_GET_ORIGIN: Layer: %s\n",fTitle.String(), cl->_name->String()));
@ -1024,7 +1024,7 @@ void ServerWindow::DispatchMessage(int32 code)
}
case AS_LAYER_RESIZE_MODE:
{
fSession->ReadUInt32(&(cl->_resize_mode));
fSession->ReadUInt32(&(cl->fResizeMode));
STRACE(("ServerWindow %s: Message AS_LAYER_RESIZE_MODE: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
@ -1042,7 +1042,7 @@ void ServerWindow::DispatchMessage(int32 code)
}
case AS_LAYER_SET_FLAGS:
{
fSession->ReadUInt32(&(cl->_flags));
fSession->ReadUInt32(&(cl->fFlags));
STRACE(("ServerWindow %s: Message AS_LAYER_SET_FLAGS: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
@ -1072,19 +1072,19 @@ void ServerWindow::DispatchMessage(int32 code)
fSession->ReadInt8(&lineCap);
fSession->ReadInt8(&lineJoin);
fSession->ReadFloat(&(cl->_layerdata->miterLimit));
fSession->ReadFloat(&(cl->fLayerData->miterLimit));
cl->_layerdata->lineCap = (cap_mode)lineCap;
cl->_layerdata->lineJoin = (join_mode)lineJoin;
cl->fLayerData->lineCap = (cap_mode)lineCap;
cl->fLayerData->lineJoin = (join_mode)lineJoin;
STRACE(("ServerWindow %s: Message AS_LAYER_SET_LINE_MODE: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
}
case AS_LAYER_GET_LINE_MODE:
{
fSession->WriteInt8((int8)(cl->_layerdata->lineCap));
fSession->WriteInt8((int8)(cl->_layerdata->lineJoin));
fSession->WriteFloat(cl->_layerdata->miterLimit);
fSession->WriteInt8((int8)(cl->fLayerData->lineCap));
fSession->WriteInt8((int8)(cl->fLayerData->lineJoin));
fSession->WriteFloat(cl->fLayerData->miterLimit);
fSession->Sync();
STRACE(("ServerWindow %s: Message AS_LAYER_GET_LINE_MODE: Layer: %s\n",fTitle.String(), cl->_name->String()));
@ -1093,8 +1093,8 @@ void ServerWindow::DispatchMessage(int32 code)
case AS_LAYER_PUSH_STATE:
{
LayerData *ld = new LayerData();
ld->prevState = cl->_layerdata;
cl->_layerdata = ld;
ld->prevState = cl->fLayerData;
cl->fLayerData = ld;
cl->RebuildFullRegion();
@ -1103,14 +1103,14 @@ void ServerWindow::DispatchMessage(int32 code)
}
case AS_LAYER_POP_STATE:
{
if (!(cl->_layerdata->prevState))
if (!(cl->fLayerData->prevState))
{
STRACE(("WARNING: SW(%s): User called BView(%s)::PopState(), but there is NO state on stack!\n", fTitle.String(), cl->_name->String()));
break;
}
LayerData *ld = cl->_layerdata;
cl->_layerdata = cl->_layerdata->prevState;
LayerData *ld = cl->fLayerData;
cl->fLayerData = cl->fLayerData->prevState;
delete ld;
cl->RebuildFullRegion();
@ -1120,14 +1120,14 @@ void ServerWindow::DispatchMessage(int32 code)
}
case AS_LAYER_SET_SCALE:
{
fSession->ReadFloat(&(cl->_layerdata->scale));
fSession->ReadFloat(&(cl->fLayerData->scale));
STRACE(("ServerWindow %s: Message AS_LAYER_SET_SCALE: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
}
case AS_LAYER_GET_SCALE:
{
LayerData *ld = cl->_layerdata;
LayerData *ld = cl->fLayerData;
float scale = ld->scale;
while((ld = ld->prevState))
@ -1146,14 +1146,14 @@ void ServerWindow::DispatchMessage(int32 code)
fSession->ReadFloat(&x);
fSession->ReadFloat(&y);
cl->_layerdata->penlocation.Set(x, y);
cl->fLayerData->penlocation.Set(x, y);
STRACE(("ServerWindow %s: Message AS_LAYER_SET_PEN_LOC: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
}
case AS_LAYER_GET_PEN_LOC:
{
fSession->WritePoint(cl->_layerdata->penlocation);
fSession->WritePoint(cl->fLayerData->penlocation);
fSession->Sync();
STRACE(("ServerWindow %s: Message AS_LAYER_GET_PEN_LOC: Layer: %s\n",fTitle.String(), cl->_name->String()));
@ -1161,14 +1161,14 @@ void ServerWindow::DispatchMessage(int32 code)
}
case AS_LAYER_SET_PEN_SIZE:
{
fSession->ReadFloat(&(cl->_layerdata->pensize));
fSession->ReadFloat(&(cl->fLayerData->pensize));
STRACE(("ServerWindow %s: Message AS_LAYER_SET_PEN_SIZE: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
}
case AS_LAYER_GET_PEN_SIZE:
{
fSession->WriteFloat(cl->_layerdata->pensize);
fSession->WriteFloat(cl->fLayerData->pensize);
fSession->Sync();
STRACE(("ServerWindow %s: Message AS_LAYER_GET_PEN_SIZE: Layer: %s\n",fTitle.String(), cl->_name->String()));
@ -1180,7 +1180,7 @@ void ServerWindow::DispatchMessage(int32 code)
fSession->ReadData(&c, sizeof(rgb_color));
cl->_layerdata->highcolor.SetColor(c);
cl->fLayerData->highcolor.SetColor(c);
STRACE(("ServerWindow %s: Message AS_LAYER_SET_HIGH_COLOR: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
@ -1191,7 +1191,7 @@ void ServerWindow::DispatchMessage(int32 code)
fSession->ReadData(&c, sizeof(rgb_color));
cl->_layerdata->lowcolor.SetColor(c);
cl->fLayerData->lowcolor.SetColor(c);
STRACE(("ServerWindow %s: Message AS_LAYER_SET_LOW_COLOR: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
@ -1202,9 +1202,9 @@ void ServerWindow::DispatchMessage(int32 code)
fSession->ReadData(&c, sizeof(rgb_color));
cl->_layerdata->viewcolor.SetColor(c);
cl->fLayerData->viewcolor.SetColor(c);
cl->Invalidate(cl->_visible);
cl->Invalidate(cl->fVisible);
STRACE(("ServerWindow %s: Message AS_LAYER_SET_VIEW_COLOR: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
@ -1213,9 +1213,9 @@ void ServerWindow::DispatchMessage(int32 code)
{
rgb_color highColor, lowColor, viewColor;
highColor = cl->_layerdata->highcolor.GetColor32();
lowColor = cl->_layerdata->lowcolor.GetColor32();
viewColor = cl->_layerdata->viewcolor.GetColor32();
highColor = cl->fLayerData->highcolor.GetColor32();
lowColor = cl->fLayerData->lowcolor.GetColor32();
viewColor = cl->fLayerData->viewcolor.GetColor32();
fSession->WriteData(&highColor, sizeof(rgb_color));
fSession->WriteData(&lowColor, sizeof(rgb_color));
@ -1232,16 +1232,16 @@ void ServerWindow::DispatchMessage(int32 code)
fSession->ReadInt8(&srcAlpha);
fSession->ReadInt8(&alphaFunc);
cl->_layerdata->alphaSrcMode = (source_alpha)srcAlpha;
cl->_layerdata->alphaFncMode = (alpha_function)alphaFunc;
cl->fLayerData->alphaSrcMode = (source_alpha)srcAlpha;
cl->fLayerData->alphaFncMode = (alpha_function)alphaFunc;
STRACE(("ServerWindow %s: Message AS_LAYER_SET_BLEND_MODE: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
}
case AS_LAYER_GET_BLEND_MODE:
{
fSession->WriteInt8((int8)(cl->_layerdata->alphaSrcMode));
fSession->WriteInt8((int8)(cl->_layerdata->alphaFncMode));
fSession->WriteInt8((int8)(cl->fLayerData->alphaSrcMode));
fSession->WriteInt8((int8)(cl->fLayerData->alphaFncMode));
fSession->Sync();
STRACE(("ServerWindow %s: Message AS_LAYER_GET_BLEND_MODE: Layer: %s\n",fTitle.String(), cl->_name->String()));
@ -1253,14 +1253,14 @@ void ServerWindow::DispatchMessage(int32 code)
fSession->ReadInt8(&drawingMode);
cl->_layerdata->draw_mode = (drawing_mode)drawingMode;
cl->fLayerData->draw_mode = (drawing_mode)drawingMode;
STRACE(("ServerWindow %s: Message AS_LAYER_SET_DRAW_MODE: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
}
case AS_LAYER_GET_DRAW_MODE:
{
fSession->WriteInt8((int8)(cl->_layerdata->draw_mode));
fSession->WriteInt8((int8)(cl->fLayerData->draw_mode));
fSession->Sync();
STRACE(("ServerWindow %s: Message AS_LAYER_GET_DRAW_MODE: Layer: %s\n",fTitle.String(), cl->_name->String()));
@ -1268,7 +1268,7 @@ void ServerWindow::DispatchMessage(int32 code)
}
case AS_LAYER_PRINT_ALIASING:
{
fSession->ReadBool(&(cl->_layerdata->fontAliasing));
fSession->ReadBool(&(cl->fLayerData->fontAliasing));
STRACE(("ServerWindow %s: Message AS_LAYER_PRINT_ALIASING: Layer: %s\n",fTitle.String(), cl->_name->String()));
break;
@ -1288,9 +1288,9 @@ void ServerWindow::DispatchMessage(int32 code)
// if we had a picture to clip to, include the FULL visible region(if any) in the area to be redrawn
// in other words: invalidate what ever is visible for this layer and his children.
if (cl->clipToPicture && cl->_fullVisible.CountRects() > 0)
if (cl->clipToPicture && cl->fFullVisible.CountRects() > 0)
{
reg.Include(&cl->_fullVisible);
reg.Include(&cl->fFullVisible);
redraw = true;
}
@ -1299,7 +1299,7 @@ void ServerWindow::DispatchMessage(int32 code)
int32 i = 0;
while(1)
{
sp=static_cast<ServerPicture*>(cl->_serverwin->fServerApp->fPictureList->ItemAt(i++));
sp=static_cast<ServerPicture*>(cl->fServerWin->fServerApp->fPictureList->ItemAt(i++));
if (!sp)
break;
@ -1323,20 +1323,20 @@ void ServerWindow::DispatchMessage(int32 code)
}
// we need to rebuild the visible region, we may have a valid one.
if (cl->_parent && !(cl->_hidden))
if (cl->fParent && !(cl->fHidden))
{
//cl->_parent->RebuildChildRegions(cl->_full.Frame(), cl);
//cl->fParent->RebuildChildRegions(cl->fFull.Frame(), cl);
}
else
{
// will this happen? Maybe...
//cl->RebuildRegions(cl->_full.Frame());
//cl->RebuildRegions(cl->fFull.Frame());
}
// include our full visible region in the region to be redrawn
if (!(cl->_hidden) && (cl->_fullVisible.CountRects() > 0))
if (!(cl->fHidden) && (cl->fFullVisible.CountRects() > 0))
{
reg.Include(&(cl->_fullVisible));
reg.Include(&(cl->fFullVisible));
redraw = true;
}
@ -1361,7 +1361,7 @@ void ServerWindow::DispatchMessage(int32 code)
while(1)
{
sp= static_cast<ServerPicture*>(cl->_serverwin->fServerApp->fPictureList->ItemAt(i++));
sp= static_cast<ServerPicture*>(cl->fServerWin->fServerApp->fPictureList->ItemAt(i++));
if (!sp)
break;
@ -1395,8 +1395,8 @@ void ServerWindow::DispatchMessage(int32 code)
LayerData *ld;
int32 noOfRects;
ld = cl->_layerdata;
reg = cl->ConvertFromParent(&(cl->_visible));
ld = cl->fLayerData;
reg = cl->ConvertFromParent(&(cl->fVisible));
if(ld->clipReg)
reg.IntersectWith(ld->clipReg);
@ -1424,17 +1424,17 @@ void ServerWindow::DispatchMessage(int32 code)
int32 noOfRects;
BRect r;
if(cl->_layerdata->clipReg)
cl->_layerdata->clipReg->MakeEmpty();
if(cl->fLayerData->clipReg)
cl->fLayerData->clipReg->MakeEmpty();
else
cl->_layerdata->clipReg = new BRegion();
cl->fLayerData->clipReg = new BRegion();
fSession->ReadInt32(&noOfRects);
for(int i = 0; i < noOfRects; i++)
{
fSession->ReadRect(&r);
cl->_layerdata->clipReg->Include(r);
cl->fLayerData->clipReg->Include(r);
}
cl->RebuildFullRegion();
@ -2306,43 +2306,43 @@ Layer* ServerWindow::FindLayer(const Layer* start, int32 token) const
return NULL;
// see if we're looking for 'start'
if(start->_view_token == token)
if(start->fViewToken == token)
return const_cast<Layer*>(start);
Layer *c = start->_topchild; //c = short for: current
Layer *c = start->fTopChild; //c = short for: current
if(c != NULL)
while(true)
{
// action block
{
if(c->_view_token == token)
if(c->fViewToken == token)
return c;
}
// go deep
if( c->_topchild)
if( c->fTopChild)
{
c = c->_topchild;
c = c->fTopChild;
}
// go right or up
else
// go right
if(c->_lowersibling)
if(c->fLowerSibling)
{
c = c->_lowersibling;
c = c->fLowerSibling;
}
// go up
else
{
while(!c->_parent->_lowersibling && c->_parent != start)
while(!c->fParent->fLowerSibling && c->fParent != start)
{
c = c->_parent;
c = c->fParent;
}
// that enough! We've reached the start layer.
if(c->_parent == start)
if(c->fParent == start)
break;
c = c->_parent->_lowersibling;
c = c->fParent->fLowerSibling;
}
}

View File

@ -84,8 +84,8 @@ WinBorder::WinBorder(const BRect &r, const char *name, const int32 look, const i
: Layer(r, name, B_NULL_TOKEN, B_FOLLOW_NONE, flags, driver)
{
// unlike BViews, windows start off as hidden
_hidden = true;
_serverwin = win;
fHidden = true;
fServerWin = win;
fMouseButtons = 0;
fKeyModifiers = 0;
@ -101,7 +101,7 @@ WinBorder::WinBorder(const BRect &r, const char *name, const int32 look, const i
fLastMousePosition.Set(-1,-1);
SetLevel();
fNewTopLayerFrame = &(win->fTopLayer->_frame);
fNewTopLayerFrame = &(win->fTopLayer->fFrame);
if (feel!= B_NO_BORDER_WINDOW_LOOK)
{
@ -110,7 +110,7 @@ WinBorder::WinBorder(const BRect &r, const char *name, const int32 look, const i
fDecorator->GetFootprint(fDecFull);
}
_full.MakeEmpty();
fFull.MakeEmpty();
STRACE(("WinBorder %s:\n",GetName()));
STRACE(("\tFrame: (%.1f,%.1f,%.1f,%.1f)\n",r.left,r.top,r.right,r.bottom));
@ -134,13 +134,13 @@ void WinBorder::RebuildFullRegion(void)
{
STRACE(("WinBorder(%s):~RebuildFullRegion()\n",GetName()));
BRegion topLayerFull;
Layer *topLayer = _serverwin->fTopLayer;
Layer *topLayer = fServerWin->fTopLayer;
topLayerFull.Set( ConvertToTop(*fNewTopLayerFrame) );
fNewTopLayerFrame = &(_serverwin->fTopLayer->_frame);
fNewTopLayerFrame = &(fServerWin->fTopLayer->fFrame);
// TODO: Convert to screen coordinates
LayerData *ld;
ld = topLayer->_layerdata;
ld = topLayer->fLayerData;
do
{
// clip to user region
@ -158,14 +158,14 @@ void WinBorder::RebuildFullRegion(void)
topLayerFull.IntersectWith( topLayer->clipToPicture );
}
_full.MakeEmpty();
_full = topLayerFull;
fFull.MakeEmpty();
fFull = topLayerFull;
if (fDecorator)
{
fDecFull->MakeEmpty();
fDecorator->GetFootprint(fDecFull);
_full.Include(fDecFull);
fFull.Include(fDecFull);
}
}
@ -371,7 +371,7 @@ void WinBorder::Draw(const BRect &r)
if(fDecorator)
{
// decorator is allowed to draw in its entire visible region, not just in the update one.
fUpdateReg = _visible;
fUpdateReg = fVisible;
fUpdateReg.IntersectWith(fDecFull);
// restrict Decorator drawing to the update region only.
fDriver->ConstrainClippingRegion(&fUpdateReg);
@ -410,7 +410,7 @@ void WinBorder::ResizeBy(float x, float y)
if(fDecorator)
fDecorator->ResizeBy(x,y);
BRect *localRect = new BRect(_serverwin->fTopLayer->_frame);
BRect *localRect = new BRect(fServerWin->fTopLayer->fFrame);
fNewTopLayerFrame = localRect;
// force topLayer's frame to resize
@ -423,7 +423,7 @@ void WinBorder::ResizeBy(float x, float y)
bool WinBorder::HasPoint(BPoint& pt) const
{
return _fullVisible.Contains(pt);
return fFullVisible.Contains(pt);
}
void WinBorder::SetMainWinBorder(WinBorder *newMain)
@ -437,28 +437,28 @@ WinBorder* WinBorder::MainWinBorder() const{
void WinBorder::SetLevel()
{
switch(_serverwin->Feel())
switch(fServerWin->Feel())
{
case B_NORMAL_WINDOW_FEEL:
_level = B_NORMAL_FEEL;
fLevel = B_NORMAL_FEEL;
break;
case B_FLOATING_SUBSET_WINDOW_FEEL:
_level = B_FLOATING_SUBSET_FEEL;
fLevel = B_FLOATING_SUBSET_FEEL;
break;
case B_FLOATING_APP_WINDOW_FEEL:
_level = B_FLOATING_APP_FEEL;
fLevel = B_FLOATING_APP_FEEL;
break;
case B_FLOATING_ALL_WINDOW_FEEL:
_level = B_FLOATING_ALL_FEEL;
fLevel = B_FLOATING_ALL_FEEL;
break;
case B_MODAL_SUBSET_WINDOW_FEEL:
_level = B_MODAL_SUBSET_FEEL;
fLevel = B_MODAL_SUBSET_FEEL;
break;
case B_MODAL_APP_WINDOW_FEEL:
_level = B_MODAL_APP_FEEL;
fLevel = B_MODAL_APP_FEEL;
break;
case B_MODAL_ALL_WINDOW_FEEL:
_level = B_MODAL_ALL_FEEL;
fLevel = B_MODAL_ALL_FEEL;
break;
case B_SYSTEM_LAST:
case B_SYSTEM_FIRST:
@ -467,11 +467,11 @@ void WinBorder::SetLevel()
// if(_win->ServerTeamID() != _win->ClientTeamID())
// _win->QuietlySetFeel(B_NORMAL_WINDOW_FEEL);
// else
_level = _serverwin->Feel();
fLevel = fServerWin->Feel();
break;
default:
_serverwin->QuietlySetFeel(B_NORMAL_WINDOW_FEEL);
_level = B_NORMAL_FEEL;
fServerWin->QuietlySetFeel(B_NORMAL_WINDOW_FEEL);
fLevel = B_NORMAL_FEEL;
break;
}
}
@ -490,7 +490,7 @@ void WinBorder::AddToSubsetOf(WinBorder* main)
{
// if the main window is hidden also hide this one.
if(main->IsHidden())
_hidden = true;
fHidden = true;
// add to main window's subset
main->Window()->fWinFMWList.AddItem(this);
@ -577,28 +577,28 @@ void WinBorder::PrintToStream()
{
printf("\t%s", GetName());
if (_level == B_FLOATING_SUBSET_FEEL)
if (fLevel == B_FLOATING_SUBSET_FEEL)
printf("\t%s", "B_FLOATING_SUBSET_WINDOW_FEEL");
if (_level == B_FLOATING_APP_FEEL)
if (fLevel == B_FLOATING_APP_FEEL)
printf("\t%s", "B_FLOATING_APP_WINDOW_FEEL");
if (_level == B_FLOATING_ALL_FEEL)
if (fLevel == B_FLOATING_ALL_FEEL)
printf("\t%s", "B_FLOATING_ALL_WINDOW_FEEL");
if (_level == B_MODAL_SUBSET_FEEL)
if (fLevel == B_MODAL_SUBSET_FEEL)
printf("\t%s", "B_MODAL_SUBSET_WINDOW_FEEL");
if (_level == B_MODAL_APP_FEEL)
if (fLevel == B_MODAL_APP_FEEL)
printf("\t%s", "B_MODAL_APP_WINDOW_FEEL");
if (_level == B_MODAL_ALL_FEEL)
if (fLevel == B_MODAL_ALL_FEEL)
printf("\t%s", "B_MODAL_ALL_WINDOW_FEEL");
if (_level == B_NORMAL_FEEL)
if (fLevel == B_NORMAL_FEEL)
printf("\t%s", "B_NORMAL_WINDOW_FEEL");
printf("\t%s\n", _hidden?"hidden" : "not hidden");
printf("\t%s\n", fHidden?"hidden" : "not hidden");
}
void WinBorder::UpdateColors(void)

View File

@ -60,7 +60,7 @@ public:
void UpdateFont(void);
void UpdateScreen(void);
ServerWindow *Window(void) const { return _serverwin; }
ServerWindow *Window(void) const { return fServerWin; }
Decorator *GetDecorator(void) const { return fDecorator; }
WinBorder *MainWinBorder() const;

View File

@ -150,12 +150,12 @@ STRACESTREAM();
SearchAndSetNewFront(nextItem? nextItem->layerPtr: NULL);
// remove some windows.
if (item && item->layerPtr->_level == B_NORMAL_FEEL)
if (item && item->layerPtr->fLevel == B_NORMAL_FEEL)
{
ListData *listItem = item->lowerItem;
while(listItem && (listItem->layerPtr->_level == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->_level == B_FLOATING_APP_FEEL
|| listItem->layerPtr->_level == B_MODAL_SUBSET_FEEL))
while(listItem && (listItem->layerPtr->fLevel == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->fLevel == B_FLOATING_APP_FEEL
|| listItem->layerPtr->fLevel == B_MODAL_SUBSET_FEEL))
{
// *carefuly* remove the item from the list
ListData *itemX = listItem;
@ -209,12 +209,12 @@ bool Workspace::HideSubsetWindows(WinBorder* layer){
//SearchAndSetNewFocus(nextItem? nextItem->layerPtr: NULL);
// remove some windows.
if (item && item->layerPtr->_level == B_NORMAL_FEEL)
if (item && item->layerPtr->fLevel == B_NORMAL_FEEL)
{
ListData *listItem = item->lowerItem;
while(listItem && (listItem->layerPtr->_level == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->_level == B_FLOATING_APP_FEEL
|| listItem->layerPtr->_level == B_MODAL_SUBSET_FEEL))
while(listItem && (listItem->layerPtr->fLevel == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->fLevel == B_FLOATING_APP_FEEL
|| listItem->layerPtr->fLevel == B_MODAL_SUBSET_FEEL))
{
// *carefuly* remove the item from the list
ListData *itemX = listItem;
@ -493,7 +493,7 @@ ListData* Workspace::FindPlace(ListData* pref){
switch(feel){
case B_NORMAL_WINDOW_FEEL:{
while(cursor && cursor->layerPtr->_level > B_MODAL_APP_FEEL){
while(cursor && cursor->layerPtr->fLevel > B_MODAL_APP_FEEL){
cursor = cursor->upperItem;
}
InsertItem(pref, cursor? cursor->lowerItem: NULL);
@ -501,7 +501,7 @@ ListData* Workspace::FindPlace(ListData* pref){
}
case B_SYSTEM_LAST:{
while(cursor && cursor->layerPtr->_level > pref->layerPtr->_level){
while(cursor && cursor->layerPtr->fLevel > pref->layerPtr->fLevel){
cursor = cursor->upperItem;
}
InsertItem(pref, cursor? cursor->lowerItem: fTopItem);
@ -512,7 +512,7 @@ ListData* Workspace::FindPlace(ListData* pref){
case B_FLOATING_ALL_WINDOW_FEEL:
case B_MODAL_ALL_WINDOW_FEEL:
case B_MODAL_APP_WINDOW_FEEL:{
while(cursor && cursor->layerPtr->_level > pref->layerPtr->_level){
while(cursor && cursor->layerPtr->fLevel > pref->layerPtr->fLevel){
cursor = cursor->upperItem;
}
InsertItem(pref, cursor? cursor->lowerItem: NULL);
@ -524,13 +524,13 @@ ListData* Workspace::FindPlace(ListData* pref){
// NOTE that this happens only if its main window is the front most one.
case B_FLOATING_SUBSET_WINDOW_FEEL:{
for(cursor = fBottomItem; cursor; cursor = cursor->upperItem){
if (cursor->layerPtr->_level <= pref->layerPtr->_level
if (cursor->layerPtr->fLevel <= pref->layerPtr->fLevel
&& (cursor->layerPtr == pref->layerPtr->MainWinBorder()
|| cursor->layerPtr->MainWinBorder() == pref->layerPtr->MainWinBorder())
)
{ break; }
else if(pref->layerPtr->_level == B_FLOATING_SUBSET_FEEL
&& cursor->layerPtr->_level == B_FLOATING_APP_FEEL)
else if(pref->layerPtr->fLevel == B_FLOATING_SUBSET_FEEL
&& cursor->layerPtr->fLevel == B_FLOATING_APP_FEEL)
{ break; }
}
if (cursor)
@ -543,10 +543,10 @@ ListData* Workspace::FindPlace(ListData* pref){
// it belongs to another application
case B_MODAL_SUBSET_WINDOW_FEEL:{
for(cursor = fBottomItem; cursor; cursor = cursor->upperItem){
if (cursor->layerPtr->_level <= pref->layerPtr->_level)
if (cursor->layerPtr->fLevel <= pref->layerPtr->fLevel)
break;
else if(pref->layerPtr->_level == B_MODAL_SUBSET_FEEL
&& cursor->layerPtr->_level == B_MODAL_APP_FEEL
else if(pref->layerPtr->fLevel == B_MODAL_SUBSET_FEEL
&& cursor->layerPtr->fLevel == B_MODAL_APP_FEEL
&& pref->layerPtr->Window()->ClientTeamID()
!= cursor->layerPtr->Window()->ClientTeamID())
break;
@ -560,7 +560,7 @@ ListData* Workspace::FindPlace(ListData* pref){
// NOTE that this happens only if its main window is the front most one.
case B_FLOATING_APP_WINDOW_FEEL:{
for(cursor = fBottomItem; cursor; cursor = cursor->upperItem){
if (cursor->layerPtr->_level <= pref->layerPtr->_level
if (cursor->layerPtr->fLevel <= pref->layerPtr->fLevel
&& pref->layerPtr->Window()->ClientTeamID() ==
cursor->layerPtr->Window()->ClientTeamID())
{ break; }
@ -752,8 +752,8 @@ STRACE((" SAME TeamID\n"));
STRACE((" DIFERRENT TeamID\n"));
// remove front window's floating(_SUBSET_/_APP_) windows, if any.
ListData *listItem = fFrontItem->lowerItem;
while(listItem && (listItem->layerPtr->_level == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->_level == B_FLOATING_APP_FEEL))
while(listItem && (listItem->layerPtr->fLevel == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->fLevel == B_FLOATING_APP_FEEL))
{ // *carefully* remove the item from the list
ListData *item = listItem;
listItem = listItem->lowerItem;
@ -866,12 +866,12 @@ STRACE((" MODAL_APP/SUBSET Window '%s'\n", preferred? preferred->GetName(): "NUL
int32 count = 0, i;
int32 prefIndex = -1;
if (fFrontItem && fFrontItem->layerPtr->_level == B_NORMAL_FEEL)
if (fFrontItem && fFrontItem->layerPtr->fLevel == B_NORMAL_FEEL)
{
// remove front window's floating(_SUBSET_/_APP_) windows, if any.
ListData *listItem = fFrontItem->lowerItem;
while(listItem && (listItem->layerPtr->_level == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->_level == B_FLOATING_APP_FEEL))
while(listItem && (listItem->layerPtr->fLevel == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->fLevel == B_FLOATING_APP_FEEL))
{ // *carefully* remove the item from the list
ListData *item = listItem;
listItem = listItem->lowerItem;
@ -968,12 +968,12 @@ STRACE((" MODAL_APP/SUBSET Window '%s'\n", preferred? preferred->GetName(): "NUL
{
STRACE((" MODAL ALL/SYSTEM FIRST Window '%s'\n", preferred? preferred->GetName(): "NULL"));
// remove all application's floating windows.
if (fFrontItem && fFrontItem->layerPtr->_level == B_NORMAL_FEEL)
if (fFrontItem && fFrontItem->layerPtr->fLevel == B_NORMAL_FEEL)
{
ListData *listItem = fFrontItem->lowerItem;
while(listItem &&
(listItem->layerPtr->_level == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->_level == B_FLOATING_APP_FEEL))
(listItem->layerPtr->fLevel == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->fLevel == B_FLOATING_APP_FEEL))
{
// *carefully* remove the item from the list
ListData *item = listItem;
@ -999,9 +999,9 @@ STRACE((" MODAL ALL/SYSTEM FIRST Window '%s'\n", preferred? preferred->GetName()
int32 feel = fBottomItem->layerPtr->Window()->Feel();
// if preferred is one of these *don't* give front state to it!
if(preferred->_level == B_FLOATING_SUBSET_FEEL
|| preferred->_level == B_FLOATING_APP_FEEL
|| preferred->_level == B_FLOATING_ALL_FEEL)
if(preferred->fLevel == B_FLOATING_SUBSET_FEEL
|| preferred->fLevel == B_FLOATING_APP_FEEL
|| preferred->fLevel == B_FLOATING_ALL_FEEL)
{
newFrontItem = exFrontItem;
}
@ -1013,7 +1013,7 @@ STRACE((" MODAL ALL/SYSTEM FIRST Window '%s'\n", preferred? preferred->GetName()
}
// the SYSTEM_LAST will get the front status, only if it's the only
// WinBorder in this workspace.
else if (preferred->_level == B_SYSTEM_LAST
else if (preferred->fLevel == B_SYSTEM_LAST
&& !(preferred->IsHidden()) )
{
if(fBottomItem->layerPtr == preferred)
@ -1068,25 +1068,25 @@ STRACE(("*WS(%ld)::SASNFocus(%s)\n", ID(), preferred? preferred->GetName(): "NUL
}
}
if (item->layerPtr->_level == B_SYSTEM_FIRST || item->layerPtr->_level == B_MODAL_ALL_FEEL)
if (item->layerPtr->fLevel == B_SYSTEM_FIRST || item->layerPtr->fLevel == B_MODAL_ALL_FEEL)
{
break;
}
if (item->layerPtr->_level == B_MODAL_APP_FEEL
if (item->layerPtr->fLevel == B_MODAL_APP_FEEL
&& (preferred && preferred->Window()->ClientTeamID() == item->layerPtr->Window()->ClientTeamID()))
{
break;
}
if (item->layerPtr->_level == B_MODAL_SUBSET_FEEL
if (item->layerPtr->fLevel == B_MODAL_SUBSET_FEEL
&& (preferred && item->layerPtr->MainWinBorder() == preferred))
{
break;
}
// select one window, other than a system_last one!
if (selectOthers && item->layerPtr->_level != B_SYSTEM_LAST){
if (selectOthers && item->layerPtr->fLevel != B_SYSTEM_LAST){
break;
}
}
@ -1156,12 +1156,12 @@ STRACE(("\n!MoveToBack(%s) -", newLast? newLast->GetName(): "NULL"));
if(item){
ListData *listItem = NULL;
switch(item->layerPtr->_level){
switch(item->layerPtr->fLevel){
case B_FLOATING_ALL_FEEL:{
STRACE((" B_FLOATING_ALL_FEEL window\n"));
// search the place where we should insert it later
listItem = item->upperItem;
while(listItem && (listItem->layerPtr->_level == item->layerPtr->_level))
while(listItem && (listItem->layerPtr->fLevel == item->layerPtr->fLevel))
listItem = listItem->upperItem;
break;
@ -1176,8 +1176,8 @@ STRACE((" B_FLOATING_SUBSET_FEEL/B_FLOATING_APP_FEEL window\n"));
// search the place where we should insert it later
listItem = item->upperItem;
while(listItem &&
(listItem->layerPtr->_level == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->_level == B_FLOATING_APP_FEEL))
(listItem->layerPtr->fLevel == B_FLOATING_SUBSET_FEEL
|| listItem->layerPtr->fLevel == B_FLOATING_APP_FEEL))
listItem = listItem->upperItem;
break;
@ -1190,9 +1190,9 @@ STRACE((" B_MODAL_SUBSET_FEEL/B_MODAL_APP_FEEL window\n"));
// search the place where we should insert it later
listItem = item->upperItem;
while(listItem &&
(listItem->layerPtr->_level == B_MODAL_SUBSET_FEEL
|| listItem->layerPtr->_level == B_MODAL_APP_FEEL
|| listItem->layerPtr->_level == B_NORMAL_FEEL))
(listItem->layerPtr->fLevel == B_MODAL_SUBSET_FEEL
|| listItem->layerPtr->fLevel == B_MODAL_APP_FEEL
|| listItem->layerPtr->fLevel == B_NORMAL_FEEL))
listItem = listItem->upperItem;
break;
@ -1202,7 +1202,7 @@ STRACE((" B_MODAL_SUBSET_FEEL/B_MODAL_APP_FEEL window\n"));
case B_NORMAL_FEEL:{
STRACE((" B_NORMAL_FEEL window\n"));
listItem = item->upperItem;
while(listItem && (listItem->layerPtr->_level >= item->layerPtr->_level)){
while(listItem && (listItem->layerPtr->fLevel >= item->layerPtr->fLevel)){
listItem = listItem->upperItem;
}
@ -1218,11 +1218,11 @@ STRACE((" B_NORMAL_FEEL window\n"));
else{
// if it's a normal window, first remove any floating windows,
// it or its application has
if(newLast->_level == B_NORMAL_FEEL && fFrontItem->layerPtr == newLast){
if(newLast->fLevel == B_NORMAL_FEEL && fFrontItem->layerPtr == newLast){
ListData *iter = item->lowerItem;
while(iter &&
(iter->layerPtr->_level == B_FLOATING_SUBSET_FEEL
|| iter->layerPtr->_level == B_FLOATING_APP_FEEL))
(iter->layerPtr->fLevel == B_FLOATING_SUBSET_FEEL
|| iter->layerPtr->fLevel == B_FLOATING_APP_FEEL))
{
// *carefully* remove the item from the list
ListData *itemX = iter;