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
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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 ([email protected])
|
||||
// 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 ([email protected])
|
||||
*/
|
||||
|
||||
//! BPicture records a series of drawing instructions that can be "replayed" later.
|
||||
|
||||
|
||||
#include <ByteOrder.h>
|
||||
#include <List.h>
|
||||
#include <Message.h>
|
||||
#include <Picture.h>
|
||||
|
||||
#include <AppServerLink.h>
|
||||
#include <ServerProtocol.h>
|
||||
#include <TPicture.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Picture.h>
|
||||
#include <Message.h>
|
||||
#include <ByteOrder.h>
|
||||
#include <TPicture.h>
|
||||
#include <Errors.h>
|
||||
#include <List.h>
|
||||
#include <AppServerLink.h>
|
||||
#include <ServerProtocol.h>
|
||||
|
||||
|
||||
struct _BPictureExtent_ {
|
||||
_BPictureExtent_(const int32 &size = 0);
|
||||
@@ -415,9 +398,9 @@ BPicture::import_old_data(const void *data, int32 size)
|
||||
link.Attach<int32>(extent->fNewSize);
|
||||
link.Attach(extent->fNewData,extent->fNewSize);
|
||||
link.FlushWithReply(&code);
|
||||
if(code==SERVER_TRUE)
|
||||
if (code == B_OK)
|
||||
link.Read<int32>(&token)
|
||||
|
||||
|
||||
// Do we free all data now?
|
||||
free(extent->fNewData);
|
||||
extent->fNewData = 0;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user