2 * Copyright 2009, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Alexandre Deckner <alex@zappotek.com>
9 #include "MainWindow.h"
10 #include "RenderView.h"
12 #include <Application.h>
18 MainWindow::MainWindow(BRect frame
, const char* title
)
20 BDirectWindow(frame
, title
, B_TITLED_WINDOW_LOOK
, B_NORMAL_WINDOW_FEEL
, 0)
22 fRenderView
= new RenderView(Bounds());
23 fRenderView
->SetViewColor(0, 0, 0);
25 AddChild(fRenderView
);
30 MainWindow::~MainWindow()
36 MainWindow::QuitRequested()
38 be_app
->PostMessage(B_QUIT_REQUESTED
);
44 MainWindow::MessageReceived(BMessage
* message
)
46 switch (message
->what
) {
48 BDirectWindow::MessageReceived(message
);
54 MainWindow::DirectConnected(direct_buffer_info
* info
)
56 fRenderView
->DirectConnected(info
);