vfs: check userland buffers before reading them.
[haiku.git] / src / tests / servers / app / benchmark / TestWindow.h
blobf6c03581dbc5bd80938e3a1fd175d9f593124fe2
1 /*
2 * Copyright (C) 2008 Stephan Aßmus <superstippi@gmx.de>
3 * All rights reserved. Distributed under the terms of the MIT license.
4 */
5 #ifndef TEST_WINDOW_H
6 #define TEST_WINDOW_H
8 #include <Messenger.h>
9 #include <View.h>
10 #include <Window.h>
13 enum {
14 MSG_TEST_FINISHED = 'tstf',
15 MSG_TEST_CANCELED = 'tstc'
19 class Test;
21 // TestView
22 class TestView : public BView {
23 public:
24 TestView(BRect frame, Test* test,
25 drawing_mode mode, bool useClipping,
26 const BMessenger& target);
28 virtual void AttachedToWindow();
29 virtual void Draw(BRect updateRect);
31 private:
32 Test* fTest;
33 BMessenger fTarget;
34 bool fUseClipping;
37 // TestWindow
38 class TestWindow : public BWindow {
39 public:
40 TestWindow(BRect fame, Test* test,
41 drawing_mode mode, bool useClipping,
42 const BMessenger& target);
44 virtual bool QuitRequested();
46 void SetAllowedToQuit(bool allowed);
47 BView* View() const { return fTestView; }
48 private:
49 BMessenger fTarget;
50 bool fAllowedToQuit;
51 TestView* fTestView;
54 #endif // TEST_WINDOW_H