xref: /haiku/src/tests/apps/miniterminal/MiniApp.cpp (revision 47a21c5c89fc9fd155a3929e5a8f6056b92a2053)
1160bd2ffSMichael Lotz /*
2160bd2ffSMichael Lotz  * Part of the MiniTerminal.
3160bd2ffSMichael Lotz  *
4160bd2ffSMichael Lotz  * Copyright 2005 Michael Lotz. All rights reserved.
5*47a21c5cSAugustin Cavalier  * Distributed under the MIT License.
6160bd2ffSMichael Lotz  */
7160bd2ffSMichael Lotz 
8ee897a16SMichael Lotz #include <stdio.h>
9160bd2ffSMichael Lotz 
1042244cf3SIngo Weinhold #include "Arguments.h"
1142244cf3SIngo Weinhold #include "MiniApp.h"
1242244cf3SIngo Weinhold #include "MiniView.h"
1342244cf3SIngo Weinhold #include "MiniWin.h"
1442244cf3SIngo Weinhold 
MiniApp(const Arguments & args)1542244cf3SIngo Weinhold MiniApp::MiniApp(const Arguments &args)
16160bd2ffSMichael Lotz 	:	BApplication("application/x-vnd.Haiku.MiniTerminal")
17160bd2ffSMichael Lotz {
1842244cf3SIngo Weinhold 	fWindow = new MiniWin(args);
19160bd2ffSMichael Lotz 	fWindow->Show();
20160bd2ffSMichael Lotz }
21160bd2ffSMichael Lotz 
22160bd2ffSMichael Lotz 
23160bd2ffSMichael Lotz void
ReadyToRun()24160bd2ffSMichael Lotz MiniApp::ReadyToRun()
25160bd2ffSMichael Lotz {
26160bd2ffSMichael Lotz 	fWindow->View()->Start();
27160bd2ffSMichael Lotz }
28160bd2ffSMichael Lotz 
29160bd2ffSMichael Lotz 
~MiniApp()30160bd2ffSMichael Lotz MiniApp::~MiniApp()
31160bd2ffSMichael Lotz {
32160bd2ffSMichael Lotz }
33160bd2ffSMichael Lotz 
34160bd2ffSMichael Lotz 
35160bd2ffSMichael Lotz int
main(int argc,const char * const argv[])3642244cf3SIngo Weinhold main(int argc, const char *const argv[])
37160bd2ffSMichael Lotz {
3842244cf3SIngo Weinhold 	Arguments args;
3942244cf3SIngo Weinhold 	args.Parse(argc, argv);
40ee897a16SMichael Lotz 
4142244cf3SIngo Weinhold 	MiniApp *app = new MiniApp(args);
42160bd2ffSMichael Lotz 	app->Run();
43160bd2ffSMichael Lotz 	delete app;
44160bd2ffSMichael Lotz 	return 0;
45160bd2ffSMichael Lotz }
46