xref: /haiku/src/servers/app/OffscreenServerWindow.cpp (revision 4f00613311d0bd6b70fa82ce19931c41f071ea4e)
1 /*
2  * Copyright 2005, 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 "OffscreenWindowLayer.h"
11 #include "ServerBitmap.h"
12 
13 #include "OffscreenServerWindow.h"
14 
15 
16 OffscreenServerWindow::OffscreenServerWindow(const char *title,
17 											 ServerApp *app,
18 											 port_id clientPort,
19 											 port_id looperPort,
20 											 int32 handlerID,
21 											 ServerBitmap* bitmap)
22 	: ServerWindow(title, app, clientPort, looperPort, handlerID),
23 	  fBitmap(bitmap)
24 {
25 }
26 
27 // destructor
28 OffscreenServerWindow::~OffscreenServerWindow()
29 {
30 }
31 
32 // SendMessageToClient
33 void
34 OffscreenServerWindow::SendMessageToClient(const BMessage* msg, int32 target,
35 								  bool usePreferred) const
36 {
37 	// We're a special kind of window. The client BWindow thread is not running,
38 	// so we cannot post messages to the client. In order to not mess arround
39 	// with all the other code, we simply make this function virtual and
40 	// don't do anything in this implementation.
41 }
42 
43 
44 WindowLayer*
45 OffscreenServerWindow::MakeWindowLayer(BRect frame, const char* name,
46 	window_look look, window_feel feel, uint32 flags, uint32 workspace)
47 {
48 	return new OffscreenWindowLayer(fBitmap, name, this);
49 }
50