xref: /haiku/src/tests/add-ons/input_server/TeamMonitorTest.cpp (revision 216f305ceaaba4d599abbd93c4dffd5e4d30a509)
1 /*
2  * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <Application.h>
8 
9 #include "KeyboardInputDevice.h"
10 #include "TeamMonitorWindow.h"
11 
12 #include <stdio.h>
13 #include <stdlib.h>
14 
15 #if DEBUG
16 FILE *KeyboardInputDevice::sLogFile = NULL;
17 #endif
18 
19 
20 int
main()21 main()
22 {
23 	BApplication app("application/x-vnd.tmwindow-test");
24 	TeamMonitorWindow *window = new TeamMonitorWindow();
25 
26 	// The window should quit the app when it is done
27 	window->SetFlags(window->Flags() | B_QUIT_ON_WINDOW_CLOSE);
28 	window->Enable();
29 
30 	// The window is designed to never quit unless this message was received.
31 	// And in our case we would like it to quit.
32 	BMessage message(SYSTEM_SHUTTING_DOWN);
33 	window->PostMessage(&message);
34 
35 	app.Run();
36 }
37