xref: /haiku/src/tests/kits/game/direct_window_test/Stars.cpp (revision 3e216965baa8d58a67bf7372e2bfa13d999f5a9d)
1 /*
2 
3 	Stars.cpp
4 
5 	by Pierre Raynaud-Richard.
6 
7 */
8 
9 /*
10 	Copyright 1999, Be Incorporated.   All Rights Reserved.
11 	This file may be used under the terms of the Be Sample Code License.
12 */
13 
14 #ifndef STAR_WINDOW_H
15 #include "StarWindow.h"
16 #endif
17 #ifndef STARS_H
18 #include "Stars.h"
19 #endif
20 
21 #include <Debug.h>
22 
23 int main(int, char**)
24 {
25 	StarsApp *myApplication;
26 
27 	myApplication = new StarsApp();
28 	if (!myApplication->abort_required)
29 		myApplication->Run();
30 	delete(myApplication);
31 	return(0);
32 }
33 
34 StarsApp::StarsApp() : BApplication("application/x-vnd.Be.StarsDemo")
35 {
36 	abort_required = false;
37 	aWindow = new StarWindow(BRect(120, 150, 540, 420), "Stars");
38 	// showing the window will also start the direct connection. If you
39 	// Sync() after the show, the direct connection will be established
40 	// when the Sync() return (as far as any part of the content area of
41 	// the window is visible after the show).
42 	if (!abort_required)
43 		aWindow->Show();
44 }
45