1 /* 2 * Copyright 2005-2008, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 9 10 #include "OffscreenWindow.h" 11 #include "ServerBitmap.h" 12 13 #include "OffscreenServerWindow.h" 14 15 16 OffscreenServerWindow::OffscreenServerWindow(const char *title, ServerApp *app, 17 port_id clientPort, port_id looperPort, int32 handlerID, 18 ServerBitmap* bitmap) 19 : ServerWindow(title, app, clientPort, looperPort, handlerID), 20 fBitmap(bitmap, true) 21 { 22 } 23 24 25 OffscreenServerWindow::~OffscreenServerWindow() 26 { 27 } 28 29 30 void 31 OffscreenServerWindow::SendMessageToClient(const BMessage* msg, int32 target, 32 bool usePreferred) const 33 { 34 // We're a special kind of window. The client BWindow thread is not running, 35 // so we cannot post messages to the client. In order to not mess arround 36 // with all the other code, we simply make this function virtual and 37 // don't do anything in this implementation. 38 } 39 40 41 Window* 42 OffscreenServerWindow::MakeWindow(BRect frame, const char* name, 43 window_look look, window_feel feel, uint32 flags, uint32 workspace) 44 { 45 return new OffscreenWindow(fBitmap, name, this); 46 } 47