Renamed all *LAYER* constants to *VIEW*.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24306 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-03-08 16:44:18 +00:00
parent 437b19277f
commit c7a77521ff
4 changed files with 335 additions and 335 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2001-2007, Haiku.
* Copyright 2001-2008, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -23,7 +23,7 @@
#endif
#define AS_REQUEST_COLOR_KEY 0x00010000
// additional option for AS_LAYER_SET_VIEW_BITMAP
// additional option for AS_VIEW_SET_VIEW_BITMAP
enum {
// NOTE: all defines have to start with "AS_" to let the "code_to_name"
@ -218,73 +218,73 @@ enum {
AS_SYNC,
AS_LAYER_CREATE,
AS_LAYER_DELETE,
AS_LAYER_CREATE_ROOT,
AS_LAYER_SHOW,
AS_LAYER_HIDE,
AS_LAYER_MOVE,
AS_LAYER_RESIZE,
AS_LAYER_DRAW,
AS_VIEW_CREATE,
AS_VIEW_DELETE,
AS_VIEW_CREATE_ROOT,
AS_VIEW_SHOW,
AS_VIEW_HIDE,
AS_VIEW_MOVE,
AS_VIEW_RESIZE,
AS_VIEW_DRAW,
// View/Layer definitions
AS_LAYER_GET_COORD,
AS_LAYER_SET_FLAGS,
AS_LAYER_SET_ORIGIN,
AS_LAYER_GET_ORIGIN,
AS_LAYER_RESIZE_MODE,
AS_LAYER_SET_CURSOR,
AS_LAYER_BEGIN_RECT_TRACK,
AS_LAYER_END_RECT_TRACK,
AS_LAYER_DRAG_RECT,
AS_LAYER_DRAG_IMAGE,
AS_LAYER_SCROLL,
AS_LAYER_SET_LINE_MODE,
AS_LAYER_GET_LINE_MODE,
AS_LAYER_PUSH_STATE,
AS_LAYER_POP_STATE,
AS_LAYER_SET_SCALE,
AS_LAYER_GET_SCALE,
AS_LAYER_SET_DRAWING_MODE,
AS_LAYER_GET_DRAWING_MODE,
AS_LAYER_SET_BLENDING_MODE,
AS_LAYER_GET_BLENDING_MODE,
AS_LAYER_SET_PEN_LOC,
AS_LAYER_GET_PEN_LOC,
AS_LAYER_SET_PEN_SIZE,
AS_LAYER_GET_PEN_SIZE,
AS_LAYER_SET_HIGH_COLOR,
AS_LAYER_SET_LOW_COLOR,
AS_LAYER_SET_VIEW_COLOR,
AS_LAYER_GET_HIGH_COLOR,
AS_LAYER_GET_LOW_COLOR,
AS_LAYER_GET_VIEW_COLOR,
AS_LAYER_PRINT_ALIASING,
AS_LAYER_CLIP_TO_PICTURE,
AS_LAYER_GET_CLIP_REGION,
AS_LAYER_DRAW_BITMAP,
AS_LAYER_SET_EVENT_MASK,
AS_LAYER_SET_MOUSE_EVENT_MASK,
AS_VIEW_GET_COORD,
AS_VIEW_SET_FLAGS,
AS_VIEW_SET_ORIGIN,
AS_VIEW_GET_ORIGIN,
AS_VIEW_RESIZE_MODE,
AS_VIEW_SET_CURSOR,
AS_VIEW_BEGIN_RECT_TRACK,
AS_VIEW_END_RECT_TRACK,
AS_VIEW_DRAG_RECT,
AS_VIEW_DRAG_IMAGE,
AS_VIEW_SCROLL,
AS_VIEW_SET_LINE_MODE,
AS_VIEW_GET_LINE_MODE,
AS_VIEW_PUSH_STATE,
AS_VIEW_POP_STATE,
AS_VIEW_SET_SCALE,
AS_VIEW_GET_SCALE,
AS_VIEW_SET_DRAWING_MODE,
AS_VIEW_GET_DRAWING_MODE,
AS_VIEW_SET_BLENDING_MODE,
AS_VIEW_GET_BLENDING_MODE,
AS_VIEW_SET_PEN_LOC,
AS_VIEW_GET_PEN_LOC,
AS_VIEW_SET_PEN_SIZE,
AS_VIEW_GET_PEN_SIZE,
AS_VIEW_SET_HIGH_COLOR,
AS_VIEW_SET_LOW_COLOR,
AS_VIEW_SET_VIEW_COLOR,
AS_VIEW_GET_HIGH_COLOR,
AS_VIEW_GET_LOW_COLOR,
AS_VIEW_GET_VIEW_COLOR,
AS_VIEW_PRINT_ALIASING,
AS_VIEW_CLIP_TO_PICTURE,
AS_VIEW_GET_CLIP_REGION,
AS_VIEW_DRAW_BITMAP,
AS_VIEW_SET_EVENT_MASK,
AS_VIEW_SET_MOUSE_EVENT_MASK,
AS_LAYER_DRAW_STRING,
AS_LAYER_SET_CLIP_REGION,
AS_LAYER_LINE_ARRAY,
AS_LAYER_BEGIN_PICTURE,
AS_LAYER_APPEND_TO_PICTURE,
AS_LAYER_END_PICTURE,
AS_LAYER_COPY_BITS,
AS_LAYER_DRAW_PICTURE,
AS_LAYER_INVALIDATE_RECT,
AS_LAYER_INVALIDATE_REGION,
AS_LAYER_INVERT_RECT,
AS_LAYER_MOVE_TO,
AS_LAYER_RESIZE_TO,
AS_LAYER_SET_STATE,
AS_LAYER_SET_FONT_STATE,
AS_LAYER_GET_STATE,
AS_LAYER_SET_VIEW_BITMAP,
AS_LAYER_SET_PATTERN,
AS_SET_CURRENT_LAYER,
AS_VIEW_DRAW_STRING,
AS_VIEW_SET_CLIP_REGION,
AS_VIEW_LINE_ARRAY,
AS_VIEW_BEGIN_PICTURE,
AS_VIEW_APPEND_TO_PICTURE,
AS_VIEW_END_PICTURE,
AS_VIEW_COPY_BITS,
AS_VIEW_DRAW_PICTURE,
AS_VIEW_INVALIDATE_RECT,
AS_VIEW_INVALIDATE_REGION,
AS_VIEW_INVERT_RECT,
AS_VIEW_MOVE_TO,
AS_VIEW_RESIZE_TO,
AS_VIEW_SET_STATE,
AS_VIEW_SET_FONT_STATE,
AS_VIEW_GET_STATE,
AS_VIEW_SET_VIEW_BITMAP,
AS_VIEW_SET_PATTERN,
AS_SET_CURRENT_VIEW,
// BDirectWindow codes
AS_DIRECT_WINDOW_GET_SYNC_DATA,

View File

@ -1,5 +1,5 @@
/*
* Copyright 2001-2007, Haiku.
* Copyright 2001-2008, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -156,7 +156,7 @@ ViewState::ViewState()
void
ViewState::UpdateServerFontState(BPrivate::PortLink &link)
{
link.StartMessage(AS_LAYER_SET_FONT_STATE);
link.StartMessage(AS_VIEW_SET_FONT_STATE);
link.Attach<uint16>(font_flags);
// always present
@ -194,7 +194,7 @@ ViewState::UpdateServerState(BPrivate::PortLink &link)
{
UpdateServerFontState(link);
link.StartMessage(AS_LAYER_SET_STATE);
link.StartMessage(AS_VIEW_SET_STATE);
link.Attach<BPoint>(pen_location);
link.Attach<float>(pen_size);
link.Attach<rgb_color>(high_color);
@ -232,7 +232,7 @@ ViewState::UpdateServerState(BPrivate::PortLink &link)
void
ViewState::UpdateFrom(BPrivate::PortLink &link)
{
link.StartMessage(AS_LAYER_GET_STATE);
link.StartMessage(AS_VIEW_GET_STATE);
int32 code;
if (link.FlushWithReply(code) != B_OK
@ -612,7 +612,7 @@ BView::Bounds() const
if (!fState->IsValid(B_VIEW_FRAME_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_COORD);
fOwner->fLink->StartMessage(AS_VIEW_GET_COORD);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -865,7 +865,7 @@ BView::SetFlags(uint32 flags)
| B_FRAME_EVENTS | B_SUBPIXEL_PRECISE)) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_FLAGS);
fOwner->fLink->StartMessage(AS_VIEW_SET_FLAGS);
fOwner->fLink->Attach<uint32>(flags);
}
}
@ -897,7 +897,7 @@ BView::Hide()
{
if (fOwner && fShowLevel == 0) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_HIDE);
fOwner->fLink->StartMessage(AS_VIEW_HIDE);
}
fShowLevel++;
@ -912,7 +912,7 @@ BView::Show()
fShowLevel--;
if (fOwner && fShowLevel == 0) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SHOW);
fOwner->fLink->StartMessage(AS_VIEW_SHOW);
}
if (fShowLevel == 0 && fParent)
@ -995,7 +995,7 @@ BView::SetOrigin(float x, float y)
fState->origin.y = y;
if (_CheckOwnerLockAndSwitchCurrent()) {
fOwner->fLink->StartMessage(AS_LAYER_SET_ORIGIN);
fOwner->fLink->StartMessage(AS_VIEW_SET_ORIGIN);
fOwner->fLink->Attach<float>(x);
fOwner->fLink->Attach<float>(y);
@ -1015,7 +1015,7 @@ BView::Origin() const
// we need to ask the server for the origin after PopState()
_CheckOwnerLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_ORIGIN);
fOwner->fLink->StartMessage(AS_VIEW_GET_ORIGIN);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -1036,7 +1036,7 @@ BView::SetResizingMode(uint32 mode)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_RESIZE_MODE);
fOwner->fLink->StartMessage(AS_VIEW_RESIZE_MODE);
fOwner->fLink->Attach<uint32>(mode);
}
@ -1060,7 +1060,7 @@ BView::SetViewCursor(const BCursor *cursor, bool sync)
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_CURSOR);
fOwner->fLink->StartMessage(AS_VIEW_SET_CURSOR);
fOwner->fLink->Attach<int32>(cursor->fServerToken);
fOwner->fLink->Attach<bool>(sync);
@ -1273,7 +1273,7 @@ void
BView::BeginRectTracking(BRect startRect, uint32 style)
{
if (_CheckOwnerLockAndSwitchCurrent()) {
fOwner->fLink->StartMessage(AS_LAYER_BEGIN_RECT_TRACK);
fOwner->fLink->StartMessage(AS_VIEW_BEGIN_RECT_TRACK);
fOwner->fLink->Attach<BRect>(startRect);
fOwner->fLink->Attach<uint32>(style);
}
@ -1284,7 +1284,7 @@ void
BView::EndRectTracking()
{
if (_CheckOwnerLockAndSwitchCurrent())
fOwner->fLink->StartMessage(AS_LAYER_END_RECT_TRACK);
fOwner->fLink->StartMessage(AS_VIEW_END_RECT_TRACK);
}
@ -1395,7 +1395,7 @@ BView::DragMessage(BMessage *message, BBitmap *image,
if (buffer) {
privateMessage.NativeFlatten(buffer, bufferSize);
fOwner->fLink->StartMessage(AS_LAYER_DRAG_IMAGE);
fOwner->fLink->StartMessage(AS_VIEW_DRAG_IMAGE);
fOwner->fLink->Attach<int32>(image->_ServerToken());
fOwner->fLink->Attach<int32>((int32)dragMode);
fOwner->fLink->Attach<BPoint>(offset);
@ -1556,7 +1556,7 @@ BView::ScrollBy(float deltaX, float deltaY)
// if we're attached to a window tell app_server about this change
if (fOwner) {
fOwner->fLink->StartMessage(AS_LAYER_SCROLL);
fOwner->fLink->StartMessage(AS_VIEW_SCROLL);
fOwner->fLink->Attach<float>(deltaX);
fOwner->fLink->Attach<float>(deltaY);
@ -1597,7 +1597,7 @@ BView::SetEventMask(uint32 mask, uint32 options)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_EVENT_MASK);
fOwner->fLink->StartMessage(AS_VIEW_SET_EVENT_MASK);
fOwner->fLink->Attach<uint32>(mask);
fOwner->fLink->Attach<uint32>(options);
fOwner->fLink->Flush();
@ -1625,7 +1625,7 @@ BView::SetMouseEventMask(uint32 mask, uint32 options)
_CheckLockAndSwitchCurrent();
fMouseEventOptions = options;
fOwner->fLink->StartMessage(AS_LAYER_SET_MOUSE_EVENT_MASK);
fOwner->fLink->StartMessage(AS_VIEW_SET_MOUSE_EVENT_MASK);
fOwner->fLink->Attach<uint32>(mask);
fOwner->fLink->Attach<uint32>(options);
fOwner->fLink->Flush();
@ -1650,7 +1650,7 @@ BView::SetLineMode(cap_mode lineCap, join_mode lineJoin, float miterLimit)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_LINE_MODE);
fOwner->fLink->StartMessage(AS_VIEW_SET_LINE_MODE);
fOwner->fLink->Attach<int8>((int8)lineCap);
fOwner->fLink->Attach<int8>((int8)lineJoin);
fOwner->fLink->Attach<float>(miterLimit);
@ -1694,7 +1694,7 @@ BView::LineMiterLimit() const
if (!fState->IsValid(B_VIEW_LINE_MODES_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_LINE_MODE);
fOwner->fLink->StartMessage(AS_VIEW_GET_LINE_MODE);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -1720,7 +1720,7 @@ BView::PushState()
{
_CheckOwnerLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_PUSH_STATE);
fOwner->fLink->StartMessage(AS_VIEW_PUSH_STATE);
// initialize origin and scale
fState->valid_flags |= B_VIEW_SCALE_BIT | B_VIEW_ORIGIN_BIT;
@ -1734,7 +1734,7 @@ BView::PopState()
{
_CheckOwnerLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_POP_STATE);
fOwner->fLink->StartMessage(AS_VIEW_POP_STATE);
// invalidate all flags (except those that are not part of pop/push)
fState->valid_flags = B_VIEW_VIEW_COLOR_BIT;
@ -1750,7 +1750,7 @@ BView::SetScale(float scale) const
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_SCALE);
fOwner->fLink->StartMessage(AS_VIEW_SET_SCALE);
fOwner->fLink->Attach<float>(scale);
fState->valid_flags |= B_VIEW_SCALE_BIT;
@ -1767,7 +1767,7 @@ BView::Scale() const
if (!fState->IsValid(B_VIEW_SCALE_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_SCALE);
fOwner->fLink->StartMessage(AS_VIEW_GET_SCALE);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -1791,7 +1791,7 @@ BView::SetDrawingMode(drawing_mode mode)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_DRAWING_MODE);
fOwner->fLink->StartMessage(AS_VIEW_SET_DRAWING_MODE);
fOwner->fLink->Attach<int8>((int8)mode);
fState->valid_flags |= B_VIEW_DRAWING_MODE_BIT;
@ -1808,7 +1808,7 @@ BView::DrawingMode() const
if (!fState->IsValid(B_VIEW_DRAWING_MODE_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_DRAWING_MODE);
fOwner->fLink->StartMessage(AS_VIEW_GET_DRAWING_MODE);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -1836,7 +1836,7 @@ BView::SetBlendingMode(source_alpha sourceAlpha, alpha_function alphaFunction)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_BLENDING_MODE);
fOwner->fLink->StartMessage(AS_VIEW_SET_BLENDING_MODE);
fOwner->fLink->Attach<int8>((int8)sourceAlpha);
fOwner->fLink->Attach<int8>((int8)alphaFunction);
@ -1857,7 +1857,7 @@ BView::GetBlendingMode(source_alpha *_sourceAlpha,
if (!fState->IsValid(B_VIEW_BLENDING_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_BLENDING_MODE);
fOwner->fLink->StartMessage(AS_VIEW_GET_BLENDING_MODE);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -1898,7 +1898,7 @@ BView::MovePenTo(float x, float y)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_PEN_LOC);
fOwner->fLink->StartMessage(AS_VIEW_SET_PEN_LOC);
fOwner->fLink->Attach<float>(x);
fOwner->fLink->Attach<float>(y);
@ -1929,7 +1929,7 @@ BView::PenLocation() const
if (!fState->IsValid(B_VIEW_PEN_LOCATION_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_PEN_LOC);
fOwner->fLink->StartMessage(AS_VIEW_GET_PEN_LOC);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -1953,7 +1953,7 @@ BView::SetPenSize(float size)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_PEN_SIZE);
fOwner->fLink->StartMessage(AS_VIEW_SET_PEN_SIZE);
fOwner->fLink->Attach<float>(size);
fState->valid_flags |= B_VIEW_PEN_SIZE_BIT;
@ -1970,7 +1970,7 @@ BView::PenSize() const
if (!fState->IsValid(B_VIEW_PEN_SIZE_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_PEN_SIZE);
fOwner->fLink->StartMessage(AS_VIEW_GET_PEN_SIZE);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -1996,7 +1996,7 @@ BView::SetHighColor(rgb_color color)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_HIGH_COLOR);
fOwner->fLink->StartMessage(AS_VIEW_SET_HIGH_COLOR);
fOwner->fLink->Attach<rgb_color>(color);
fState->valid_flags |= B_VIEW_HIGH_COLOR_BIT;
@ -2014,7 +2014,7 @@ BView::HighColor() const
if (!fState->IsValid(B_VIEW_HIGH_COLOR_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_HIGH_COLOR);
fOwner->fLink->StartMessage(AS_VIEW_GET_HIGH_COLOR);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -2039,7 +2039,7 @@ BView::SetLowColor(rgb_color color)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_LOW_COLOR);
fOwner->fLink->StartMessage(AS_VIEW_SET_LOW_COLOR);
fOwner->fLink->Attach<rgb_color>(color);
fState->valid_flags |= B_VIEW_LOW_COLOR_BIT;
@ -2057,7 +2057,7 @@ BView::LowColor() const
if (!fState->IsValid(B_VIEW_LOW_COLOR_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_LOW_COLOR);
fOwner->fLink->StartMessage(AS_VIEW_GET_LOW_COLOR);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -2081,7 +2081,7 @@ BView::SetViewColor(rgb_color color)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_VIEW_COLOR);
fOwner->fLink->StartMessage(AS_VIEW_SET_VIEW_COLOR);
fOwner->fLink->Attach<rgb_color>(color);
fState->valid_flags |= B_VIEW_VIEW_COLOR_BIT;
@ -2099,7 +2099,7 @@ BView::ViewColor() const
if (!fState->IsValid(B_VIEW_VIEW_COLOR_BIT) && fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_VIEW_COLOR);
fOwner->fLink->StartMessage(AS_VIEW_GET_VIEW_COLOR);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -2123,7 +2123,7 @@ BView::ForceFontAliasing(bool enable)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_PRINT_ALIASING);
fOwner->fLink->StartMessage(AS_VIEW_PRINT_ALIASING);
fOwner->fLink->Attach<bool>(enable);
fState->valid_flags |= B_VIEW_FONT_ALIASING_BIT;
@ -2263,7 +2263,7 @@ BView::GetClippingRegion(BRegion* region) const
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_GET_CLIP_REGION);
fOwner->fLink->StartMessage(AS_VIEW_GET_CLIP_REGION);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -2279,7 +2279,7 @@ void
BView::ConstrainClippingRegion(BRegion* region)
{
if (_CheckOwnerLockAndSwitchCurrent()) {
fOwner->fLink->StartMessage(AS_LAYER_SET_CLIP_REGION);
fOwner->fLink->StartMessage(AS_VIEW_SET_CLIP_REGION);
if (region) {
int32 count = region->CountRects();
@ -2313,7 +2313,7 @@ BView::DrawBitmapAsync(const BBitmap *bitmap, BRect srcRect, BRect dstRect)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_DRAW_BITMAP);
fOwner->fLink->StartMessage(AS_VIEW_DRAW_BITMAP);
fOwner->fLink->Attach<int32>(bitmap->_ServerToken());
fOwner->fLink->Attach<BRect>(dstRect);
fOwner->fLink->Attach<BRect>(srcRect);
@ -2346,7 +2346,7 @@ BView::DrawBitmapAsync(const BBitmap *bitmap, BPoint where)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_DRAW_BITMAP);
fOwner->fLink->StartMessage(AS_VIEW_DRAW_BITMAP);
fOwner->fLink->Attach<int32>(bitmap->_ServerToken());
BRect src = bitmap->Bounds().OffsetToCopy(B_ORIGIN);
BRect dst = src.OffsetToCopy(where);
@ -3098,7 +3098,7 @@ BView::BeginPicture(BPicture *picture)
picture->Usurp(cpicture);
cpicture = picture;
fOwner->fLink->StartMessage(AS_LAYER_BEGIN_PICTURE);
fOwner->fLink->StartMessage(AS_VIEW_BEGIN_PICTURE);
}
}
@ -3117,7 +3117,7 @@ BView::AppendToPicture(BPicture *picture)
picture->SetToken(-1);
picture->Usurp(cpicture);
cpicture = picture;
fOwner->fLink->StartMessage(AS_LAYER_APPEND_TO_PICTURE);
fOwner->fLink->StartMessage(AS_VIEW_APPEND_TO_PICTURE);
fOwner->fLink->Attach<int32>(token);
}
}
@ -3130,7 +3130,7 @@ BView::EndPicture()
if (_CheckOwnerLockAndSwitchCurrent() && cpicture) {
int32 token;
fOwner->fLink->StartMessage(AS_LAYER_END_PICTURE);
fOwner->fLink->StartMessage(AS_VIEW_END_PICTURE);
int32 code;
if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -3226,7 +3226,7 @@ BView::CopyBits(BRect src, BRect dst)
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_COPY_BITS);
fOwner->fLink->StartMessage(AS_VIEW_COPY_BITS);
fOwner->fLink->Attach<BRect>(src);
fOwner->fLink->Attach<BRect>(dst);
@ -3284,7 +3284,7 @@ BView::DrawPictureAsync(const BPicture *picture, BPoint where)
return;
if (_CheckOwnerLockAndSwitchCurrent() && picture->Token() > 0) {
fOwner->fLink->StartMessage(AS_LAYER_DRAW_PICTURE);
fOwner->fLink->StartMessage(AS_VIEW_DRAW_PICTURE);
fOwner->fLink->Attach<int32>(picture->Token());
fOwner->fLink->Attach<BPoint>(where);
@ -3335,7 +3335,7 @@ BView::Invalidate(BRect invalRect)
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_INVALIDATE_RECT);
fOwner->fLink->StartMessage(AS_VIEW_INVALIDATE_RECT);
fOwner->fLink->Attach<BRect>(invalRect);
fOwner->fLink->Flush();
}
@ -3349,7 +3349,7 @@ BView::Invalidate(const BRegion* region)
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_INVALIDATE_REGION);
fOwner->fLink->StartMessage(AS_VIEW_INVALIDATE_REGION);
fOwner->fLink->AttachRegion(*region);
fOwner->fLink->Flush();
@ -3369,7 +3369,7 @@ BView::InvertRect(BRect rect)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_INVERT_RECT);
fOwner->fLink->StartMessage(AS_VIEW_INVERT_RECT);
fOwner->fLink->Attach<BRect>(rect);
_FlushIfNotInTransaction();
@ -3533,7 +3533,7 @@ BView::_RemoveSelf()
if (owner != NULL && !fTopLevelView) {
// the top level view is deleted by the app_server automatically
owner->fLink->StartMessage(AS_LAYER_DELETE);
owner->fLink->StartMessage(AS_VIEW_DELETE);
owner->fLink->Attach<int32>(_get_object_token_(this));
}
@ -3603,7 +3603,7 @@ BView::MoveTo(float x, float y)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_MOVE_TO);
fOwner->fLink->StartMessage(AS_VIEW_MOVE_TO);
fOwner->fLink->Attach<float>(x);
fOwner->fLink->Attach<float>(y);
@ -3628,7 +3628,7 @@ BView::ResizeBy(float deltaWidth, float deltaHeight)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_RESIZE_TO);
fOwner->fLink->StartMessage(AS_VIEW_RESIZE_TO);
fOwner->fLink->Attach<float>(fBounds.Width() + deltaWidth);
fOwner->fLink->Attach<float>(fBounds.Height() + deltaHeight);
@ -4300,7 +4300,7 @@ BView::_ClipToPicture(BPicture *picture, BPoint where,
return;
if (_CheckOwnerLockAndSwitchCurrent()) {
fOwner->fLink->StartMessage(AS_LAYER_CLIP_TO_PICTURE);
fOwner->fLink->StartMessage(AS_VIEW_CLIP_TO_PICTURE);
fOwner->fLink->Attach<int32>(picture->Token());
fOwner->fLink->Attach<BPoint>(where);
fOwner->fLink->Attach<bool>(invert);
@ -4397,14 +4397,14 @@ BView::_AddChildToList(BView* child, BView* before)
bool
BView::_CreateSelf()
{
// AS_LAYER_CREATE & AS_LAYER_CREATE_ROOT do not use the
// AS_VIEW_CREATE & AS_VIEW_CREATE_ROOT do not use the
// current view mechanism via _CheckLockAndSwitchCurrent() - the token
// of the view and its parent are both send to the server.
if (fTopLevelView)
fOwner->fLink->StartMessage(AS_LAYER_CREATE_ROOT);
fOwner->fLink->StartMessage(AS_VIEW_CREATE_ROOT);
else
fOwner->fLink->StartMessage(AS_LAYER_CREATE);
fOwner->fLink->StartMessage(AS_VIEW_CREATE);
fOwner->fLink->Attach<int32>(_get_object_token_(this));
fOwner->fLink->AttachString(Name());
@ -4700,7 +4700,7 @@ BView::_UpdateStateForRemove()
fState->UpdateFrom(*fOwner->fLink);
// if (!fState->IsValid(B_VIEW_FRAME_BIT)) {
// fOwner->fLink->StartMessage(AS_LAYER_GET_COORD);
// fOwner->fLink->StartMessage(AS_VIEW_GET_COORD);
//
// status_t code;
// if (fOwner->fLink->FlushWithReply(code) == B_OK
@ -4729,7 +4729,7 @@ BView::_UpdatePattern(::pattern pattern)
if (fOwner) {
_CheckLockAndSwitchCurrent();
fOwner->fLink->StartMessage(AS_LAYER_SET_PATTERN);
fOwner->fLink->StartMessage(AS_VIEW_SET_PATTERN);
fOwner->fLink->Attach< ::pattern>(pattern);
fState->valid_flags |= B_VIEW_PATTERN_BIT;
@ -4777,7 +4777,7 @@ BView::_SetViewBitmap(const BBitmap* bitmap, BRect srcRect,
int32 serverToken = bitmap ? bitmap->_ServerToken() : -1;
fOwner->fLink->StartMessage(AS_LAYER_SET_VIEW_BITMAP);
fOwner->fLink->StartMessage(AS_VIEW_SET_VIEW_BITMAP);
fOwner->fLink->Attach<int32>(serverToken);
fOwner->fLink->Attach<BRect>(srcRect);
fOwner->fLink->Attach<BRect>(dstRect);
@ -4849,7 +4849,7 @@ BView::_SwitchServerCurrentView() const
if (fOwner->fLastViewToken != serverToken) {
STRACE(("contacting app_server... sending token: %ld\n", serverToken));
fOwner->fLink->StartMessage(AS_SET_CURRENT_LAYER);
fOwner->fLink->StartMessage(AS_SET_CURRENT_VIEW);
fOwner->fLink->Attach<int32>(serverToken);
fOwner->fLastViewToken = serverToken;

View File

@ -206,73 +206,73 @@ string_for_message_code(uint32 code, BString& string)
case AS_SYNC: string = "AS_SYNC"; break;
case AS_LAYER_CREATE: string = "AS_LAYER_CREATE"; break;
case AS_LAYER_DELETE: string = "AS_LAYER_DELETE"; break;
case AS_LAYER_CREATE_ROOT: string = "AS_LAYER_CREATE_ROOT"; break;
case AS_LAYER_SHOW: string = "AS_LAYER_SHOW"; break;
case AS_LAYER_HIDE: string = "AS_LAYER_HIDE"; break;
case AS_LAYER_MOVE: string = "AS_LAYER_MOVE"; break;
case AS_LAYER_RESIZE: string = "AS_LAYER_RESIZE"; break;
case AS_LAYER_DRAW: string = "AS_LAYER_DRAW"; break;
case AS_VIEW_CREATE: string = "AS_VIEW_CREATE"; break;
case AS_VIEW_DELETE: string = "AS_VIEW_DELETE"; break;
case AS_VIEW_CREATE_ROOT: string = "AS_VIEW_CREATE_ROOT"; break;
case AS_VIEW_SHOW: string = "AS_VIEW_SHOW"; break;
case AS_VIEW_HIDE: string = "AS_VIEW_HIDE"; break;
case AS_VIEW_MOVE: string = "AS_VIEW_MOVE"; break;
case AS_VIEW_RESIZE: string = "AS_VIEW_RESIZE"; break;
case AS_VIEW_DRAW: string = "AS_VIEW_DRAW"; break;
// View definitions
case AS_LAYER_GET_COORD: string = "AS_LAYER_GET_COORD"; break;
case AS_LAYER_SET_FLAGS: string = "AS_LAYER_SET_FLAGS"; break;
case AS_LAYER_SET_ORIGIN: string = "AS_LAYER_SET_ORIGIN"; break;
case AS_LAYER_GET_ORIGIN: string = "AS_LAYER_GET_ORIGIN"; break;
case AS_LAYER_RESIZE_MODE: string = "AS_LAYER_RESIZE_MODE"; break;
case AS_LAYER_SET_CURSOR: string = "AS_LAYER_SET_CURSOR"; break;
case AS_LAYER_BEGIN_RECT_TRACK: string = "AS_LAYER_BEGIN_RECT_TRACK"; break;
case AS_LAYER_END_RECT_TRACK: string = "AS_LAYER_END_RECT_TRACK"; break;
case AS_LAYER_DRAG_RECT: string = "AS_LAYER_DRAG_RECT"; break;
case AS_LAYER_DRAG_IMAGE: string = "AS_LAYER_DRAG_IMAGE"; break;
case AS_LAYER_SCROLL: string = "AS_LAYER_SCROLL"; break;
case AS_LAYER_SET_LINE_MODE: string = "AS_LAYER_SET_LINE_MODE"; break;
case AS_LAYER_GET_LINE_MODE: string = "AS_LAYER_GET_LINE_MODE"; break;
case AS_LAYER_PUSH_STATE: string = "AS_LAYER_PUSH_STATE"; break;
case AS_LAYER_POP_STATE: string = "AS_LAYER_POP_STATE"; break;
case AS_LAYER_SET_SCALE: string = "AS_LAYER_SET_SCALE"; break;
case AS_LAYER_GET_SCALE: string = "AS_LAYER_GET_SCALE"; break;
case AS_LAYER_SET_DRAWING_MODE: string = "AS_LAYER_SET_DRAWING_MODE"; break;
case AS_LAYER_GET_DRAWING_MODE: string = "AS_LAYER_GET_DRAWING_MODE"; break;
case AS_LAYER_SET_BLENDING_MODE: string = "AS_LAYER_SET_BLENDING_MODE"; break;
case AS_LAYER_GET_BLENDING_MODE: string = "AS_LAYER_GET_BLENDING_MODE"; break;
case AS_LAYER_SET_PEN_LOC: string = "AS_LAYER_SET_PEN_LOC"; break;
case AS_LAYER_GET_PEN_LOC: string = "AS_LAYER_GET_PEN_LOC"; break;
case AS_LAYER_SET_PEN_SIZE: string = "AS_LAYER_SET_PEN_SIZE"; break;
case AS_LAYER_GET_PEN_SIZE: string = "AS_LAYER_GET_PEN_SIZE"; break;
case AS_LAYER_SET_HIGH_COLOR: string = "AS_LAYER_SET_HIGH_COLOR"; break;
case AS_LAYER_SET_LOW_COLOR: string = "AS_LAYER_SET_LOW_COLOR"; break;
case AS_LAYER_SET_VIEW_COLOR: string = "AS_LAYER_SET_VIEW_COLOR"; break;
case AS_LAYER_GET_HIGH_COLOR: string = "AS_LAYER_GET_HIGH_COLOR"; break;
case AS_LAYER_GET_LOW_COLOR: string = "AS_LAYER_GET_LOW_COLOR"; break;
case AS_LAYER_GET_VIEW_COLOR: string = "AS_LAYER_GET_VIEW_COLOR"; break;
case AS_LAYER_PRINT_ALIASING: string = "AS_LAYER_PRINT_ALIASING"; break;
case AS_LAYER_CLIP_TO_PICTURE: string = "AS_LAYER_CLIP_TO_PICTURE"; break;
case AS_LAYER_GET_CLIP_REGION: string = "AS_LAYER_GET_CLIP_REGION"; break;
case AS_LAYER_DRAW_BITMAP: string = "AS_LAYER_DRAW_BITMAP"; break;
case AS_LAYER_SET_EVENT_MASK: string = "AS_LAYER_SET_EVENT_MASK"; break;
case AS_LAYER_SET_MOUSE_EVENT_MASK: string = "AS_LAYER_SET_MOUSE_EVENT_MASK"; break;
case AS_VIEW_GET_COORD: string = "AS_VIEW_GET_COORD"; break;
case AS_VIEW_SET_FLAGS: string = "AS_VIEW_SET_FLAGS"; break;
case AS_VIEW_SET_ORIGIN: string = "AS_VIEW_SET_ORIGIN"; break;
case AS_VIEW_GET_ORIGIN: string = "AS_VIEW_GET_ORIGIN"; break;
case AS_VIEW_RESIZE_MODE: string = "AS_VIEW_RESIZE_MODE"; break;
case AS_VIEW_SET_CURSOR: string = "AS_VIEW_SET_CURSOR"; break;
case AS_VIEW_BEGIN_RECT_TRACK: string = "AS_VIEW_BEGIN_RECT_TRACK"; break;
case AS_VIEW_END_RECT_TRACK: string = "AS_VIEW_END_RECT_TRACK"; break;
case AS_VIEW_DRAG_RECT: string = "AS_VIEW_DRAG_RECT"; break;
case AS_VIEW_DRAG_IMAGE: string = "AS_VIEW_DRAG_IMAGE"; break;
case AS_VIEW_SCROLL: string = "AS_VIEW_SCROLL"; break;
case AS_VIEW_SET_LINE_MODE: string = "AS_VIEW_SET_LINE_MODE"; break;
case AS_VIEW_GET_LINE_MODE: string = "AS_VIEW_GET_LINE_MODE"; break;
case AS_VIEW_PUSH_STATE: string = "AS_VIEW_PUSH_STATE"; break;
case AS_VIEW_POP_STATE: string = "AS_VIEW_POP_STATE"; break;
case AS_VIEW_SET_SCALE: string = "AS_VIEW_SET_SCALE"; break;
case AS_VIEW_GET_SCALE: string = "AS_VIEW_GET_SCALE"; break;
case AS_VIEW_SET_DRAWING_MODE: string = "AS_VIEW_SET_DRAWING_MODE"; break;
case AS_VIEW_GET_DRAWING_MODE: string = "AS_VIEW_GET_DRAWING_MODE"; break;
case AS_VIEW_SET_BLENDING_MODE: string = "AS_VIEW_SET_BLENDING_MODE"; break;
case AS_VIEW_GET_BLENDING_MODE: string = "AS_VIEW_GET_BLENDING_MODE"; break;
case AS_VIEW_SET_PEN_LOC: string = "AS_VIEW_SET_PEN_LOC"; break;
case AS_VIEW_GET_PEN_LOC: string = "AS_VIEW_GET_PEN_LOC"; break;
case AS_VIEW_SET_PEN_SIZE: string = "AS_VIEW_SET_PEN_SIZE"; break;
case AS_VIEW_GET_PEN_SIZE: string = "AS_VIEW_GET_PEN_SIZE"; break;
case AS_VIEW_SET_HIGH_COLOR: string = "AS_VIEW_SET_HIGH_COLOR"; break;
case AS_VIEW_SET_LOW_COLOR: string = "AS_VIEW_SET_LOW_COLOR"; break;
case AS_VIEW_SET_VIEW_COLOR: string = "AS_VIEW_SET_VIEW_COLOR"; break;
case AS_VIEW_GET_HIGH_COLOR: string = "AS_VIEW_GET_HIGH_COLOR"; break;
case AS_VIEW_GET_LOW_COLOR: string = "AS_VIEW_GET_LOW_COLOR"; break;
case AS_VIEW_GET_VIEW_COLOR: string = "AS_VIEW_GET_VIEW_COLOR"; break;
case AS_VIEW_PRINT_ALIASING: string = "AS_VIEW_PRINT_ALIASING"; break;
case AS_VIEW_CLIP_TO_PICTURE: string = "AS_VIEW_CLIP_TO_PICTURE"; break;
case AS_VIEW_GET_CLIP_REGION: string = "AS_VIEW_GET_CLIP_REGION"; break;
case AS_VIEW_DRAW_BITMAP: string = "AS_VIEW_DRAW_BITMAP"; break;
case AS_VIEW_SET_EVENT_MASK: string = "AS_VIEW_SET_EVENT_MASK"; break;
case AS_VIEW_SET_MOUSE_EVENT_MASK: string = "AS_VIEW_SET_MOUSE_EVENT_MASK"; break;
case AS_LAYER_DRAW_STRING: string = "AS_LAYER_DRAW_STRING"; break;
case AS_LAYER_SET_CLIP_REGION: string = "AS_LAYER_SET_CLIP_REGION"; break;
case AS_LAYER_LINE_ARRAY: string = "AS_LAYER_LINE_ARRAY"; break;
case AS_LAYER_BEGIN_PICTURE: string = "AS_LAYER_BEGIN_PICTURE"; break;
case AS_LAYER_APPEND_TO_PICTURE: string = "AS_LAYER_APPEND_TO_PICTURE"; break;
case AS_LAYER_END_PICTURE: string = "AS_LAYER_END_PICTURE"; break;
case AS_LAYER_COPY_BITS: string = "AS_LAYER_COPY_BITS"; break;
case AS_LAYER_DRAW_PICTURE: string = "AS_LAYER_DRAW_PICTURE"; break;
case AS_LAYER_INVALIDATE_RECT: string = "AS_LAYER_INVALIDATE_RECT"; break;
case AS_LAYER_INVALIDATE_REGION: string = "AS_LAYER_INVALIDATE_REGION"; break;
case AS_LAYER_INVERT_RECT: string = "AS_LAYER_INVERT_RECT"; break;
case AS_LAYER_MOVE_TO: string = "AS_LAYER_MOVE_TO"; break;
case AS_LAYER_RESIZE_TO: string = "AS_LAYER_RESIZE_TO"; break;
case AS_LAYER_SET_STATE: string = "AS_LAYER_SET_STATE"; break;
case AS_LAYER_SET_FONT_STATE: string = "AS_LAYER_SET_FONT_STATE"; break;
case AS_LAYER_GET_STATE: string = "AS_LAYER_GET_STATE"; break;
case AS_LAYER_SET_VIEW_BITMAP: string = "AS_LAYER_SET_VIEW_BITMAP"; break;
case AS_LAYER_SET_PATTERN: string = "AS_LAYER_SET_PATTERN"; break;
case AS_SET_CURRENT_LAYER: string = "AS_SET_CURRENT_LAYER"; break;
case AS_VIEW_DRAW_STRING: string = "AS_VIEW_DRAW_STRING"; break;
case AS_VIEW_SET_CLIP_REGION: string = "AS_VIEW_SET_CLIP_REGION"; break;
case AS_VIEW_LINE_ARRAY: string = "AS_VIEW_LINE_ARRAY"; break;
case AS_VIEW_BEGIN_PICTURE: string = "AS_VIEW_BEGIN_PICTURE"; break;
case AS_VIEW_APPEND_TO_PICTURE: string = "AS_VIEW_APPEND_TO_PICTURE"; break;
case AS_VIEW_END_PICTURE: string = "AS_VIEW_END_PICTURE"; break;
case AS_VIEW_COPY_BITS: string = "AS_VIEW_COPY_BITS"; break;
case AS_VIEW_DRAW_PICTURE: string = "AS_VIEW_DRAW_PICTURE"; break;
case AS_VIEW_INVALIDATE_RECT: string = "AS_VIEW_INVALIDATE_RECT"; break;
case AS_VIEW_INVALIDATE_REGION: string = "AS_VIEW_INVALIDATE_REGION"; break;
case AS_VIEW_INVERT_RECT: string = "AS_VIEW_INVERT_RECT"; break;
case AS_VIEW_MOVE_TO: string = "AS_VIEW_MOVE_TO"; break;
case AS_VIEW_RESIZE_TO: string = "AS_VIEW_RESIZE_TO"; break;
case AS_VIEW_SET_STATE: string = "AS_VIEW_SET_STATE"; break;
case AS_VIEW_SET_FONT_STATE: string = "AS_VIEW_SET_FONT_STATE"; break;
case AS_VIEW_GET_STATE: string = "AS_VIEW_GET_STATE"; break;
case AS_VIEW_SET_VIEW_BITMAP: string = "AS_VIEW_SET_VIEW_BITMAP"; break;
case AS_VIEW_SET_PATTERN: string = "AS_VIEW_SET_PATTERN"; break;
case AS_SET_CURRENT_VIEW: string = "AS_SET_CURRENT_VIEW"; break;
// BDirectWindow codes
case AS_DIRECT_WINDOW_GET_SYNC_DATA: string = "AS_DIRECT_WINDOW_GET_SYNC_DATA"; break;

View File

@ -1115,7 +1115,7 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
// View creation and destruction (don't need a valid fCurrentView)
case AS_SET_CURRENT_LAYER:
case AS_SET_CURRENT_VIEW:
{
int32 token;
if (link.Read<int32>(&token) != B_OK)
@ -1126,23 +1126,23 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
(void**)&current) != B_OK
|| current->Window()->ServerWindow() != this) {
// ToDo: if this happens, we probably want to kill the app and clean up
fprintf(stderr, "ServerWindow %s: Message AS_SET_CURRENT_LAYER: view not found, token %ld\n", fTitle, token);
fprintf(stderr, "ServerWindow %s: Message AS_SET_CURRENT_VIEW: view not found, token %ld\n", fTitle, token);
current = NULL;
} else {
DTRACE(("ServerWindow %s: Message AS_SET_CURRENT_LAYER: %s, token %ld\n", fTitle, current->Name(), token));
DTRACE(("ServerWindow %s: Message AS_SET_CURRENT_VIEW: %s, token %ld\n", fTitle, current->Name(), token));
_SetCurrentView(current);
}
break;
}
case AS_LAYER_CREATE_ROOT:
case AS_VIEW_CREATE_ROOT:
{
STRACE(("ServerWindow %s: Message AS_LAYER_CREATE_ROOT\n", fTitle));
STRACE(("ServerWindow %s: Message AS_VIEW_CREATE_ROOT\n", fTitle));
// Start receiving top_view data -- pass NULL as the parent view.
// This should be the *only* place where this happens.
if (fCurrentView != NULL) {
fprintf(stderr, "ServerWindow %s: Message AS_LAYER_CREATE_ROOT: fCurrentView already set!!\n", fTitle);
fprintf(stderr, "ServerWindow %s: Message AS_VIEW_CREATE_ROOT: fCurrentView already set!!\n", fTitle);
break;
}
@ -1151,16 +1151,16 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_CREATE:
case AS_VIEW_CREATE:
{
STRACE(("ServerWindow %s: Message AS_LAYER_CREATE: View name: %s\n", fTitle, fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_CREATE: View name: %s\n", fTitle, fCurrentView->Name()));
View* parent = NULL;
View* newView = _CreateView(link, &parent);
if (parent != NULL && newView != NULL)
parent->AddChild(newView);
else
fprintf(stderr, "ServerWindow %s: Message AS_LAYER_CREATE: parent or newView NULL!!\n", fTitle);
fprintf(stderr, "ServerWindow %s: Message AS_VIEW_CREATE: parent or newView NULL!!\n", fTitle);
break;
}
@ -1198,9 +1198,9 @@ ServerWindow::_DispatchViewMessage(int32 code,
return;
switch (code) {
case AS_LAYER_SCROLL:
case AS_VIEW_SCROLL:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SCROLL: View name: %s\n", fTitle, fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SCROLL: View name: %s\n", fTitle, fCurrentView->Name()));
float dh;
float dv;
@ -1209,7 +1209,7 @@ ServerWindow::_DispatchViewMessage(int32 code,
fWindow->ScrollViewBy(fCurrentView, dh, dv);
break;
}
case AS_LAYER_COPY_BITS:
case AS_VIEW_COPY_BITS:
{
BRect src;
BRect dst;
@ -1223,7 +1223,7 @@ ServerWindow::_DispatchViewMessage(int32 code,
fCurrentView->CopyBits(src, dst, contentRegion);
break;
}
case AS_LAYER_DELETE:
case AS_VIEW_DELETE:
{
// Received when a view is detached from a window
@ -1237,7 +1237,7 @@ ServerWindow::_DispatchViewMessage(int32 code,
&& view->Window()->ServerWindow() == this) {
View* parent = view->Parent();
STRACE(("ServerWindow %s: AS_LAYER_DELETE view: %p, parent: %p\n",
STRACE(("ServerWindow %s: AS_VIEW_DELETE view: %p, parent: %p\n",
fTitle, view, parent));
if (parent != NULL) {
@ -1260,9 +1260,9 @@ fDesktop->LockSingleWindow();
}
break;
}
case AS_LAYER_SET_STATE:
case AS_VIEW_SET_STATE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_STATE: View name: %s\n", fTitle, fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_STATE: View name: %s\n", fTitle, fCurrentView->Name()));
fCurrentView->CurrentState()->ReadFromLink(link);
// TODO: When is this used?!?
@ -1271,17 +1271,17 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_SET_FONT_STATE:
case AS_VIEW_SET_FONT_STATE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_FONT_STATE: View name: %s\n", fTitle, fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_FONT_STATE: View name: %s\n", fTitle, fCurrentView->Name()));
fCurrentView->CurrentState()->ReadFontFromLink(link);
fWindow->GetDrawingEngine()->SetFont(
fCurrentView->CurrentState());
break;
}
case AS_LAYER_GET_STATE:
case AS_VIEW_GET_STATE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_STATE: View name: %s\n", fTitle, fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_STATE: View name: %s\n", fTitle, fCurrentView->Name()));
fLink.StartMessage(B_OK);
@ -1290,9 +1290,9 @@ fDesktop->LockSingleWindow();
fLink.Flush();
break;
}
case AS_LAYER_SET_EVENT_MASK:
case AS_VIEW_SET_EVENT_MASK:
{
STRACE(("ServerWindow %s: Message AS_LAYER_SET_EVENT_MASK: View name: %s\n", fTitle, fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_SET_EVENT_MASK: View name: %s\n", fTitle, fCurrentView->Name()));
uint32 eventMask, options;
link.Read<uint32>(&eventMask);
@ -1312,9 +1312,9 @@ fDesktop->LockSingleWindow();
}
break;
}
case AS_LAYER_SET_MOUSE_EVENT_MASK:
case AS_VIEW_SET_MOUSE_EVENT_MASK:
{
STRACE(("ServerWindow %s: Message AS_LAYER_SET_MOUSE_EVENT_MASK: View name: %s\n", fTitle, fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_SET_MOUSE_EVENT_MASK: View name: %s\n", fTitle, fCurrentView->Name()));
uint32 eventMask, options;
link.Read<uint32>(&eventMask);
@ -1334,9 +1334,9 @@ fDesktop->LockSingleWindow();
// TODO: support B_LOCK_WINDOW_FOCUS option in Desktop
break;
}
case AS_LAYER_MOVE_TO:
case AS_VIEW_MOVE_TO:
{
STRACE(("ServerWindow %s: Message AS_LAYER_MOVE_TO: View name: %s\n",
STRACE(("ServerWindow %s: Message AS_VIEW_MOVE_TO: View name: %s\n",
fTitle, fCurrentView->Name()));
float x, y;
@ -1360,9 +1360,9 @@ fDesktop->LockSingleWindow();
fWindow->MarkContentDirty(dirty);
break;
}
case AS_LAYER_RESIZE_TO:
case AS_VIEW_RESIZE_TO:
{
STRACE(("ServerWindow %s: Message AS_LAYER_RESIZE_TO: View name: %s\n",
STRACE(("ServerWindow %s: Message AS_VIEW_RESIZE_TO: View name: %s\n",
fTitle, fCurrentView->Name()));
float newWidth, newHeight;
@ -1382,9 +1382,9 @@ fDesktop->LockSingleWindow();
fWindow->MarkContentDirty(dirty);
break;
}
case AS_LAYER_GET_COORD:
case AS_VIEW_GET_COORD:
{
STRACE(("ServerWindow %s: Message AS_LAYER_GET_COORD: View: %s\n", Title(), fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_GET_COORD: View: %s\n", Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
// our offset in the parent -> will be originX and originY in BView
BPoint parentOffset = fCurrentView->Frame().LeftTop();
@ -1393,9 +1393,9 @@ fDesktop->LockSingleWindow();
fLink.Flush();
break;
}
case AS_LAYER_SET_ORIGIN:
case AS_VIEW_SET_ORIGIN:
{
STRACE(("ServerWindow %s: Message AS_LAYER_SET_ORIGIN: View: %s\n", Title(), fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_SET_ORIGIN: View: %s\n", Title(), fCurrentView->Name()));
float x, y;
link.Read<float>(&x);
@ -1405,17 +1405,17 @@ fDesktop->LockSingleWindow();
_UpdateDrawState(fCurrentView);
break;
}
case AS_LAYER_GET_ORIGIN:
case AS_VIEW_GET_ORIGIN:
{
STRACE(("ServerWindow %s: Message AS_LAYER_GET_ORIGIN: View: %s\n", Title(), fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_GET_ORIGIN: View: %s\n", Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
fLink.Attach<BPoint>(fCurrentView->DrawingOrigin());
fLink.Flush();
break;
}
case AS_LAYER_RESIZE_MODE:
case AS_VIEW_RESIZE_MODE:
{
STRACE(("ServerWindow %s: Message AS_LAYER_RESIZE_MODE: View: %s\n",
STRACE(("ServerWindow %s: Message AS_VIEW_RESIZE_MODE: View: %s\n",
Title(), fCurrentView->Name()));
uint32 resizeMode;
@ -1423,9 +1423,9 @@ fDesktop->LockSingleWindow();
fCurrentView->SetResizeMode(resizeMode);
break;
}
case AS_LAYER_SET_CURSOR:
case AS_VIEW_SET_CURSOR:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_CURSOR: View: %s\n", Title(),
DTRACE(("ServerWindow %s: Message AS_VIEW_CURSOR: View: %s\n", Title(),
fCurrentView->Name()));
int32 token;
@ -1455,31 +1455,31 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_SET_FLAGS:
case AS_VIEW_SET_FLAGS:
{
uint32 flags;
link.Read<uint32>(&flags);
fCurrentView->SetFlags(flags);
_UpdateDrawState(fCurrentView);
STRACE(("ServerWindow %s: Message AS_LAYER_SET_FLAGS: View: %s\n", Title(), fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_SET_FLAGS: View: %s\n", Title(), fCurrentView->Name()));
break;
}
case AS_LAYER_HIDE:
case AS_VIEW_HIDE:
{
STRACE(("ServerWindow %s: Message AS_LAYER_HIDE: View: %s\n", Title(), fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_HIDE: View: %s\n", Title(), fCurrentView->Name()));
fCurrentView->SetHidden(true);
break;
}
case AS_LAYER_SHOW:
case AS_VIEW_SHOW:
{
STRACE(("ServerWindow %s: Message AS_LAYER_SHOW: View: %s\n", Title(), fCurrentView->Name()));
STRACE(("ServerWindow %s: Message AS_VIEW_SHOW: View: %s\n", Title(), fCurrentView->Name()));
fCurrentView->SetHidden(false);
break;
}
case AS_LAYER_SET_LINE_MODE:
case AS_VIEW_SET_LINE_MODE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_LINE_MODE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_LINE_MODE: View: %s\n", Title(), fCurrentView->Name()));
int8 lineCap, lineJoin;
float miterLimit;
@ -1497,9 +1497,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_GET_LINE_MODE:
case AS_VIEW_GET_LINE_MODE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_LINE_MODE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_LINE_MODE: View: %s\n", Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
fLink.Attach<int8>((int8)(fCurrentView->CurrentState()->LineCapMode()));
fLink.Attach<int8>((int8)(fCurrentView->CurrentState()->LineJoinMode()));
@ -1508,26 +1508,26 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_PUSH_STATE:
case AS_VIEW_PUSH_STATE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_PUSH_STATE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_PUSH_STATE: View: %s\n", Title(), fCurrentView->Name()));
fCurrentView->PushState();
// TODO: is this necessary?
_UpdateDrawState(fCurrentView);
break;
}
case AS_LAYER_POP_STATE:
case AS_VIEW_POP_STATE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_POP_STATE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_POP_STATE: View: %s\n", Title(), fCurrentView->Name()));
fCurrentView->PopState();
_UpdateDrawState(fCurrentView);
break;
}
case AS_LAYER_SET_SCALE:
case AS_VIEW_SET_SCALE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_SCALE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_SCALE: View: %s\n", Title(), fCurrentView->Name()));
float scale;
link.Read<float>(&scale);
@ -1535,18 +1535,18 @@ fDesktop->LockSingleWindow();
_UpdateDrawState(fCurrentView);
break;
}
case AS_LAYER_GET_SCALE:
case AS_VIEW_GET_SCALE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_SCALE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_SCALE: View: %s\n", Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
fLink.Attach<float>(fCurrentView->CurrentState()->Scale());
fLink.Flush();
break;
}
case AS_LAYER_SET_PEN_LOC:
case AS_VIEW_SET_PEN_LOC:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_PEN_LOC: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_PEN_LOC: View: %s\n", Title(), fCurrentView->Name()));
float x, y;
link.Read<float>(&x);
@ -1555,18 +1555,18 @@ fDesktop->LockSingleWindow();
fCurrentView->CurrentState()->SetPenLocation(BPoint(x, y));
break;
}
case AS_LAYER_GET_PEN_LOC:
case AS_VIEW_GET_PEN_LOC:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_PEN_LOC: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_PEN_LOC: View: %s\n", Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
fLink.Attach<BPoint>(fCurrentView->CurrentState()->PenLocation());
fLink.Flush();
break;
}
case AS_LAYER_SET_PEN_SIZE:
case AS_VIEW_SET_PEN_SIZE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_PEN_SIZE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_PEN_SIZE: View: %s\n", Title(), fCurrentView->Name()));
float penSize;
link.Read<float>(&penSize);
@ -1575,9 +1575,9 @@ fDesktop->LockSingleWindow();
fCurrentView->CurrentState()->PenSize());
break;
}
case AS_LAYER_GET_PEN_SIZE:
case AS_VIEW_GET_PEN_SIZE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_PEN_SIZE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_PEN_SIZE: View: %s\n", Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
fLink.Attach<float>(
fCurrentView->CurrentState()->UnscaledPenSize());
@ -1585,9 +1585,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_SET_VIEW_COLOR:
case AS_VIEW_SET_VIEW_COLOR:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_VIEW_COLOR: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_VIEW_COLOR: View: %s\n", Title(), fCurrentView->Name()));
rgb_color c;
link.Read(&c, sizeof(rgb_color));
@ -1596,8 +1596,8 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_GET_HIGH_COLOR:
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_HIGH_COLOR: View: %s\n",
case AS_VIEW_GET_HIGH_COLOR:
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_HIGH_COLOR: View: %s\n",
Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
@ -1605,8 +1605,8 @@ fDesktop->LockSingleWindow();
fLink.Flush();
break;
case AS_LAYER_GET_LOW_COLOR:
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_LOW_COLOR: View: %s\n",
case AS_VIEW_GET_LOW_COLOR:
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_LOW_COLOR: View: %s\n",
Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
@ -1614,8 +1614,8 @@ fDesktop->LockSingleWindow();
fLink.Flush();
break;
case AS_LAYER_GET_VIEW_COLOR:
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_VIEW_COLOR: View: %s\n",
case AS_VIEW_GET_VIEW_COLOR:
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_VIEW_COLOR: View: %s\n",
Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
@ -1623,9 +1623,9 @@ fDesktop->LockSingleWindow();
fLink.Flush();
break;
case AS_LAYER_SET_BLENDING_MODE:
case AS_VIEW_SET_BLENDING_MODE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_BLEND_MODE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_BLEND_MODE: View: %s\n", Title(), fCurrentView->Name()));
int8 srcAlpha, alphaFunc;
link.Read<int8>(&srcAlpha);
@ -1638,9 +1638,9 @@ fDesktop->LockSingleWindow();
(alpha_function)alphaFunc);
break;
}
case AS_LAYER_GET_BLENDING_MODE:
case AS_VIEW_GET_BLENDING_MODE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_BLEND_MODE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_BLEND_MODE: View: %s\n", Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
fLink.Attach<int8>((int8)(fCurrentView->CurrentState()->AlphaSrcMode()));
fLink.Attach<int8>((int8)(fCurrentView->CurrentState()->AlphaFncMode()));
@ -1648,9 +1648,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_SET_DRAWING_MODE:
case AS_VIEW_SET_DRAWING_MODE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_DRAW_MODE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_DRAW_MODE: View: %s\n", Title(), fCurrentView->Name()));
int8 drawingMode;
link.Read<int8>(&drawingMode);
@ -1660,16 +1660,16 @@ fDesktop->LockSingleWindow();
fWindow->GetDrawingEngine()->SetDrawingMode((drawing_mode)drawingMode);
break;
}
case AS_LAYER_GET_DRAWING_MODE:
case AS_VIEW_GET_DRAWING_MODE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_DRAW_MODE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_DRAW_MODE: View: %s\n", Title(), fCurrentView->Name()));
fLink.StartMessage(B_OK);
fLink.Attach<int8>((int8)(fCurrentView->CurrentState()->GetDrawingMode()));
fLink.Flush();
break;
}
case AS_LAYER_SET_VIEW_BITMAP:
case AS_VIEW_SET_VIEW_BITMAP:
{
int32 bitmapToken, resizingMode, options;
BRect srcRect, dstRect;
@ -1720,9 +1720,9 @@ fDesktop->LockSingleWindow();
fLink.Flush();
break;
}
case AS_LAYER_PRINT_ALIASING:
case AS_VIEW_PRINT_ALIASING:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_PRINT_ALIASING: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_PRINT_ALIASING: View: %s\n", Title(), fCurrentView->Name()));
bool fontAliasing;
if (link.Read<bool>(&fontAliasing) == B_OK) {
fCurrentView->CurrentState()->SetForceFontAliasing(fontAliasing);
@ -1730,9 +1730,9 @@ fDesktop->LockSingleWindow();
}
break;
}
case AS_LAYER_CLIP_TO_PICTURE:
case AS_VIEW_CLIP_TO_PICTURE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_CLIP_TO_PICTURE: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_CLIP_TO_PICTURE: View: %s\n", Title(), fCurrentView->Name()));
// TODO: you are not allowed to use View regions here!!!
int32 pictureToken;
@ -1757,7 +1757,7 @@ fDesktop->LockSingleWindow();
fCurrentView->SetUserClipping(&region);
// TODO: reenable AS_LAYER_CLIP_TO_PICTURE
// TODO: reenable AS_VIEW_CLIP_TO_PICTURE
#if 0
if (rootLayer && !(fCurrentView->IsHidden()) && !fWindow->InUpdate()) {
BRegion invalidRegion;
@ -1774,9 +1774,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_GET_CLIP_REGION:
case AS_VIEW_GET_CLIP_REGION:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_GET_CLIP_REGION: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_GET_CLIP_REGION: View: %s\n", Title(), fCurrentView->Name()));
// if this View is hidden, it is clear that its visible region is void.
fLink.StartMessage(B_OK);
@ -1791,9 +1791,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_SET_CLIP_REGION:
case AS_VIEW_SET_CLIP_REGION:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_CLIP_REGION: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_CLIP_REGION: View: %s\n", Title(), fCurrentView->Name()));
int32 rectCount;
status_t status = link.Read<int32>(&rectCount);
@ -1822,9 +1822,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_INVALIDATE_RECT:
case AS_VIEW_INVALIDATE_RECT:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_INVALIDATE_RECT: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_INVALIDATE_RECT: View: %s\n", Title(), fCurrentView->Name()));
// NOTE: looks like this call is NOT affected by origin and scale on R5
// so this implementation is "correct"
@ -1835,9 +1835,9 @@ fDesktop->LockSingleWindow();
}
break;
}
case AS_LAYER_INVALIDATE_REGION:
case AS_VIEW_INVALIDATE_REGION:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_INVALIDATE_RECT: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_INVALIDATE_RECT: View: %s\n", Title(), fCurrentView->Name()));
// NOTE: looks like this call is NOT affected by origin and scale on R5
// so this implementation is "correct"
@ -1849,9 +1849,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_SET_HIGH_COLOR:
case AS_VIEW_SET_HIGH_COLOR:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_HIGH_COLOR: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_HIGH_COLOR: View: %s\n", Title(), fCurrentView->Name()));
rgb_color c;
link.Read(&c, sizeof(rgb_color));
@ -1860,9 +1860,9 @@ fDesktop->LockSingleWindow();
fWindow->GetDrawingEngine()->SetHighColor(c);
break;
}
case AS_LAYER_SET_LOW_COLOR:
case AS_VIEW_SET_LOW_COLOR:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_LOW_COLOR: View: %s\n", Title(), fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_LOW_COLOR: View: %s\n", Title(), fCurrentView->Name()));
rgb_color c;
link.Read(&c, sizeof(rgb_color));
@ -1871,9 +1871,9 @@ fDesktop->LockSingleWindow();
fWindow->GetDrawingEngine()->SetLowColor(c);
break;
}
case AS_LAYER_SET_PATTERN:
case AS_VIEW_SET_PATTERN:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_SET_PATTERN: View: %s\n", fTitle, fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_PATTERN: View: %s\n", fTitle, fCurrentView->Name()));
pattern pat;
link.Read(&pat, sizeof(pattern));
@ -1882,9 +1882,9 @@ fDesktop->LockSingleWindow();
fWindow->GetDrawingEngine()->SetPattern(pat);
break;
}
case AS_LAYER_DRAG_IMAGE:
case AS_VIEW_DRAG_IMAGE:
{
// TODO: flesh out AS_LAYER_DRAG_IMAGE
// TODO: flesh out AS_VIEW_DRAG_IMAGE
STRACE(("ServerWindow %s: Message AS_DRAG_IMAGE\n", Title()));
int32 bitmapToken;
@ -1917,9 +1917,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_DRAG_RECT:
case AS_VIEW_DRAG_RECT:
{
// TODO: flesh out AS_LAYER_DRAG_RECT
// TODO: flesh out AS_VIEW_DRAG_RECT
STRACE(("ServerWindow %s: Message AS_DRAG_RECT\n", Title()));
BRect dragRect;
@ -1947,9 +1947,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_BEGIN_RECT_TRACK:
case AS_VIEW_BEGIN_RECT_TRACK:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_BEGIN_RECT_TRACK\n", Title()));
DTRACE(("ServerWindow %s: Message AS_VIEW_BEGIN_RECT_TRACK\n", Title()));
BRect dragRect;
uint32 style;
@ -1961,25 +1961,25 @@ fDesktop->LockSingleWindow();
// but without real drag message)
break;
}
case AS_LAYER_END_RECT_TRACK:
case AS_VIEW_END_RECT_TRACK:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_END_RECT_TRACK\n", Title()));
DTRACE(("ServerWindow %s: Message AS_VIEW_END_RECT_TRACK\n", Title()));
// TODO: implement rect tracking
break;
}
case AS_LAYER_BEGIN_PICTURE:
case AS_VIEW_BEGIN_PICTURE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_BEGIN_PICTURE\n", Title()));
DTRACE(("ServerWindow %s: Message AS_VIEW_BEGIN_PICTURE\n", Title()));
ServerPicture *picture = App()->CreatePicture();
picture->SyncState(fCurrentView);
fCurrentView->SetPicture(picture);
break;
}
case AS_LAYER_APPEND_TO_PICTURE:
case AS_VIEW_APPEND_TO_PICTURE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_APPEND_TO_PICTURE\n", Title()));
DTRACE(("ServerWindow %s: Message AS_VIEW_APPEND_TO_PICTURE\n", Title()));
int32 pictureToken;
link.Read<int32>(&pictureToken);
@ -1991,9 +1991,9 @@ fDesktop->LockSingleWindow();
break;
}
case AS_LAYER_END_PICTURE:
case AS_VIEW_END_PICTURE:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_END_PICTURE\n", Title()));
DTRACE(("ServerWindow %s: Message AS_VIEW_END_PICTURE\n", Title()));
ServerPicture *picture = fCurrentView->Picture();
if (picture != NULL) {
@ -2092,7 +2092,7 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code, BPrivate::LinkReceiver &li
fCurrentView->CurrentState()->SetPenLocation(penPos);
break;
}
case AS_LAYER_INVERT_RECT:
case AS_VIEW_INVERT_RECT:
{
DTRACE(("ServerWindow %s: Message AS_INVERT_RECT\n", Title()));
@ -2125,9 +2125,9 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code, BPrivate::LinkReceiver &li
drawingEngine->FillRect(rect);
break;
}
case AS_LAYER_DRAW_BITMAP:
case AS_VIEW_DRAW_BITMAP:
{
DTRACE(("ServerWindow %s: Message AS_LAYER_DRAW_BITMAP: View name: %s\n", fTitle, fCurrentView->Name()));
DTRACE(("ServerWindow %s: Message AS_VIEW_DRAW_BITMAP: View name: %s\n", fTitle, fCurrentView->Name()));
int32 bitmapToken;
BRect srcRect, dstRect;
@ -2354,7 +2354,7 @@ ServerWindow::_DispatchViewDrawingMessage(int32 code, BPrivate::LinkReceiver &li
break;
}
case AS_LAYER_DRAW_PICTURE:
case AS_VIEW_DRAW_PICTURE:
{
int32 token;
if (link.Read<int32>(&token) == B_OK) {
@ -2396,7 +2396,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
return false;
switch (code) {
case AS_LAYER_SET_ORIGIN:
case AS_VIEW_SET_ORIGIN:
{
float x, y;
link.Read<float>(&x);
@ -2406,7 +2406,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_INVERT_RECT:
case AS_VIEW_INVERT_RECT:
{
BRect rect;
link.Read<BRect>(&rect);
@ -2415,19 +2415,19 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_PUSH_STATE:
case AS_VIEW_PUSH_STATE:
{
picture->WritePushState();
break;
}
case AS_LAYER_POP_STATE:
case AS_VIEW_POP_STATE:
{
picture->WritePopState();
break;
}
case AS_LAYER_SET_DRAWING_MODE:
case AS_VIEW_SET_DRAWING_MODE:
{
int8 drawingMode;
link.Read<int8>(&drawingMode);
@ -2436,7 +2436,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_SET_PEN_LOC:
case AS_VIEW_SET_PEN_LOC:
{
float x, y;
link.Read<float>(&x);
@ -2444,7 +2444,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
picture->WriteSetPenLocation(BPoint(x, y));
break;
}
case AS_LAYER_SET_PEN_SIZE:
case AS_VIEW_SET_PEN_SIZE:
{
float penSize;
link.Read<float>(&penSize);
@ -2452,7 +2452,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_SET_LINE_MODE:
case AS_VIEW_SET_LINE_MODE:
{
int8 lineCap, lineJoin;
float miterLimit;
@ -2465,7 +2465,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_SET_SCALE:
case AS_VIEW_SET_SCALE:
{
float scale;
link.Read<float>(&scale);
@ -2473,7 +2473,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_SET_PATTERN:
case AS_VIEW_SET_PATTERN:
{
pattern pat;
link.Read(&pat, sizeof(pattern));
@ -2481,7 +2481,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_SET_FONT_STATE:
case AS_VIEW_SET_FONT_STATE:
{
picture->SetFontFromLink(link);
break;
@ -2639,13 +2639,13 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_SET_LOW_COLOR:
case AS_LAYER_SET_HIGH_COLOR:
case AS_VIEW_SET_LOW_COLOR:
case AS_VIEW_SET_HIGH_COLOR:
{
rgb_color color;
link.Read(&color, sizeof(rgb_color));
if (code == AS_LAYER_SET_HIGH_COLOR)
if (code == AS_VIEW_SET_HIGH_COLOR)
picture->WriteSetHighColor(color);
else
picture->WriteSetLowColor(color);
@ -2704,7 +2704,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_DRAW_BITMAP:
case AS_VIEW_DRAW_BITMAP:
{
int32 token;
link.Read<int32>(&token);
@ -2726,7 +2726,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_DRAW_PICTURE:
case AS_VIEW_DRAW_PICTURE:
{
int32 token;
if (link.Read<int32>(&token) == B_OK) {
@ -2745,7 +2745,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_SET_CLIP_REGION:
case AS_VIEW_SET_CLIP_REGION:
{
int32 rectCount;
status_t status = link.Read<int32>(&rectCount);
@ -2770,7 +2770,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_BEGIN_PICTURE:
case AS_VIEW_BEGIN_PICTURE:
{
ServerPicture *newPicture = App()->CreatePicture();
newPicture->Usurp(picture);
@ -2780,7 +2780,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_APPEND_TO_PICTURE:
case AS_VIEW_APPEND_TO_PICTURE:
{
int32 pictureToken;
link.Read<int32>(&pictureToken);
@ -2794,7 +2794,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
break;
}
case AS_LAYER_END_PICTURE:
case AS_VIEW_END_PICTURE:
{
ServerPicture *steppedDown = picture->StepDown();
fCurrentView->SetPicture(steppedDown);
@ -2804,7 +2804,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
return true;
}
/*
case AS_LAYER_SET_BLENDING_MODE:
case AS_VIEW_SET_BLENDING_MODE:
{
int8 srcAlpha, alphaFunc;
@ -3186,8 +3186,8 @@ ServerWindow::_MessageNeedsAllWindowsLocked(uint32 code) const
case AS_SET_WINDOW_TITLE:
case AS_ADD_TO_SUBSET:
case AS_REMOVE_FROM_SUBSET:
case AS_LAYER_CREATE_ROOT:
case AS_LAYER_CREATE:
case AS_VIEW_CREATE_ROOT:
case AS_VIEW_CREATE:
case AS_SEND_BEHIND:
case AS_SET_LOOK:
case AS_SET_FEEL:
@ -3199,8 +3199,8 @@ ServerWindow::_MessageNeedsAllWindowsLocked(uint32 code) const
case AS_SET_DECORATOR_SETTINGS:
case AS_GET_MOUSE:
case AS_DIRECT_WINDOW_SET_FULLSCREEN:
// case AS_LAYER_SET_EVENT_MASK:
// case AS_LAYER_SET_MOUSE_EVENT_MASK:
// case AS_VIEW_SET_EVENT_MASK:
// case AS_VIEW_SET_MOUSE_EVENT_MASK:
return true;
default:
return false;