blob: b1b386a6de4248ae258bd16441408f7d34b936b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* $Id: HandBrake.cpp,v 1.6 2003/09/30 14:38:15 titer Exp $
This file is part of the HandBrake source code.
Homepage: <http://beos.titer.org/handbrake/>.
It may be used under the terms of the GNU General Public License. */
#include <signal.h>
#include "HandBrake.h"
#include "MainWindow.h"
void SigHandler( int signal )
{
((HBApp*) be_app)->fWindow->PostMessage( B_QUIT_REQUESTED );
}
int main( int argc, char ** argv )
{
signal( SIGINT, SigHandler );
signal( SIGHUP, SigHandler );
signal( SIGQUIT, SigHandler );
int c;
bool debug = false;
while( ( c = getopt( argc, argv, "v" ) ) != -1 )
{
switch( c )
{
case 'v':
debug = true;
break;
default:
break;
}
}
/* Run the BApplication */
HBApp * app = new HBApp( debug );
app->Run();
delete app;
return 0;
}
/* Constructor */
HBApp::HBApp( bool debug )
: BApplication( "application/x-vnd.titer-handbrake" )
{
fWindow = new HBWindow( debug );
fWindow->Show();
}
|