From e55d041b59b22de17138d2e665d2069025bccbab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 26 Apr 2006 09:33:08 +0000 Subject: [PATCH] Finally removed SERVER_{TRUE|FALSE} and lots of other unused constants from ServerProtocol.h. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17237 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/app/ServerProtocol.h | 25 +----------- src/kits/interface/Picture.cpp | 57 ++++++++++------------------ src/servers/app/Desktop.cpp | 2 +- 3 files changed, 22 insertions(+), 62 deletions(-) diff --git a/headers/private/app/ServerProtocol.h b/headers/private/app/ServerProtocol.h index a5de756c55..8e6a2252cb 100644 --- a/headers/private/app/ServerProtocol.h +++ b/headers/private/app/ServerProtocol.h @@ -26,10 +26,6 @@ // additional option for AS_LAYER_SET_VIEW_BITMAP enum { - // Used for quick replies from the app_server - SERVER_TRUE = B_OK, - SERVER_FALSE = B_ERROR, - // NOTE: all defines have to start with "AS_" to let the "code_to_name" // utility work correctly @@ -58,10 +54,6 @@ enum { AS_DELETE_BITMAP, AS_GET_BITMAP_OVERLAY_RESTRICTIONS, - AS_ACQUIRE_SERVERMEM, - AS_RELEASE_SERVERMEM, - AS_AREA_MESSAGE, - // Cursor commands AS_SET_CURSOR, @@ -168,8 +160,7 @@ enum { // Global function call defs AS_SET_UI_COLORS, - AS_GET_UI_COLORS, - AS_GET_UI_COLOR, + AS_SET_UI_COLOR, AS_SET_DECORATOR, AS_GET_DECORATOR, AS_R5_SET_DECORATOR, @@ -192,12 +183,6 @@ enum { AS_GET_MOUSE_MODE, AS_GET_MOUSE, - // Hook function messages - AS_WORKSPACE_ACTIVATED, - AS_WORKSPACES_CHANGED, - AS_WINDOW_ACTIVATED, - AS_SCREENMODE_CHANGED, - // Graphics calls AS_SET_HIGH_COLOR, AS_SET_LOW_COLOR, @@ -231,25 +216,17 @@ enum { AS_SET_FONT, AS_SET_FONT_SIZE, - AS_FLUSH, AS_SYNC, AS_LAYER_CREATE, AS_LAYER_DELETE, AS_LAYER_CREATE_ROOT, - AS_LAYER_ADD_CHILD, - AS_LAYER_REMOVE_CHILD, - AS_LAYER_REMOVE_SELF, AS_LAYER_SHOW, AS_LAYER_HIDE, AS_LAYER_MOVE, AS_LAYER_RESIZE, AS_LAYER_DRAW, - AS_LAYER_GET_TOKEN, - AS_LAYER_ADD, - AS_LAYER_REMOVE, - // View/Layer definitions AS_LAYER_GET_COORD, AS_LAYER_SET_FLAGS, diff --git a/src/kits/interface/Picture.cpp b/src/kits/interface/Picture.cpp index 3a54f791bc..f16c2448d2 100644 --- a/src/kits/interface/Picture.cpp +++ b/src/kits/interface/Picture.cpp @@ -1,44 +1,27 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2005, Haiku -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Picture.cpp -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BPicture records a series of drawing instructions that can -// be "replayed" later. -//------------------------------------------------------------------------------ +/* + * Copyright 2001-2006, Haiku Inc. + * Distributed under the terms of the MIT License. + * + * Authors: + * Marc Flerackers (mflerackers@androme.be) + */ +//! BPicture records a series of drawing instructions that can be "replayed" later. + + +#include +#include +#include +#include + +#include +#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include - struct _BPictureExtent_ { _BPictureExtent_(const int32 &size = 0); @@ -415,9 +398,9 @@ BPicture::import_old_data(const void *data, int32 size) link.Attach(extent->fNewSize); link.Attach(extent->fNewData,extent->fNewSize); link.FlushWithReply(&code); - if(code==SERVER_TRUE) + if (code == B_OK) link.Read(&token) - + // Do we free all data now? free(extent->fNewData); extent->fNewData = 0; diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index 68a7950e1b..15b647a3b9 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -465,7 +465,7 @@ Desktop::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link) // if everything went well, ServerApp::Run() will notify // the client - but since it didn't, we do it here BPrivate::LinkSender reply(clientReplyPort); - reply.StartMessage(SERVER_FALSE); + reply.StartMessage(B_ERROR); reply.Flush(); }