2 * main.c -- GTK+ 2 dv1394d client demo
3 * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
4 * Copyright (C) 2010 Dan Dennedy <dan@dennedy.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 #include "interface.h"
32 #include "dv1394app.h"
34 int main( int argc
, char *argv
[] )
41 bindtextdomain (GETTEXT_PACKAGE
, PACKAGE_LOCALE_DIR
);
42 bind_textdomain_codeset (GETTEXT_PACKAGE
, "UTF-8");
43 textdomain (GETTEXT_PACKAGE
);
49 gtk_init( &argc
, &argv
);
51 // Linux hack to determine path of the executable
52 memset(path
, 0, sizeof(path
));
53 readlink( "/proc/self/exe", path
, 512 );
54 if ( strstr( path
, "/bin/rugen" ) )
56 ( *strstr( path
, "/bin/rugen" ) ) = '\0';
57 strcat( path
, "/share/rugen/pixmaps" );
58 add_pixmap_directory( path
);
60 else if ( strstr( path
, "/src/rugen" ) )
62 ( *strstr( path
, "/src/rugen" ) ) = '\0';
63 strcat( path
, "/pixmaps" );
64 add_pixmap_directory( path
);
68 add_pixmap_directory( PACKAGE_DATA_DIR
"/" PACKAGE
"/pixmaps" );
71 gdv1394d
= create_gdv1394d ();
72 gtk_widget_show (gdv1394d
);
75 app
= dv1394app_init( gdv1394d
, argv
[ 1 ] );
79 dv1394app_close( app
);