xref: /haiku/src/tests/apps/miniterminal/MiniApp.cpp (revision 1a3518cf757c2da8006753f83962da5935bbc82b)
1 /*
2  * Part of the MiniTerminal.
3  *
4  * Copyright 2005 Michael Lotz. All rights reserved.
5  * Distributed under the MIT License.
6  */
7 
8 #include <stdio.h>
9 
10 #include "Arguments.h"
11 #include "MiniApp.h"
12 #include "MiniView.h"
13 #include "MiniWin.h"
14 
15 MiniApp::MiniApp(const Arguments &args)
16 	:	BApplication("application/x-vnd.Haiku.MiniTerminal")
17 {
18 	fWindow = new MiniWin(args);
19 	fWindow->Show();
20 }
21 
22 
23 void
24 MiniApp::ReadyToRun()
25 {
26 	fWindow->View()->Start();
27 }
28 
29 
30 MiniApp::~MiniApp()
31 {
32 }
33 
34 
35 int
36 main(int argc, const char *const argv[])
37 {
38 	Arguments args;
39 	args.Parse(argc, argv);
40 
41 	MiniApp *app = new MiniApp(args);
42 	app->Run();
43 	delete app;
44 	return 0;
45 }
46