Fawkes API  Fawkes Development Version
main.cpp
1 
2 /***************************************************************************
3  * main.cpp - Nao GUI main
4  *
5  * Created: Mon Oct 27 17:36:22 2008
6  * Copyright 2008-2011 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #include "naogui.h"
24 
25 #include <core/threading/thread.h>
26 
27 /** This is the main program of the Nao GUI. */
28 int
29 main(int argc, char **argv) {
31 
32  std::locale::global( std::locale( "" ) );
33  Gtk::Main gtk_main(argc, argv);
34 
35 
36  try {
37  Glib::RefPtr<Gtk::Builder> builder;
38  builder =
39  Gtk::Builder::create_from_file(RESDIR"/guis/naogui/naogui.ui");
40 
41  NaoGuiGtkWindow *window = NULL;
42  builder->get_widget_derived("window", window);
43 
44  Gtk::Main::run(*window);
45 
46  delete window;
47  } catch (Gtk::BuilderError &e) {
48  printf("Failed to instantiate window: %s\n", e.what().c_str());
49  }
50 
52 
53  return 0;
54 }
static void init_main()
Initialize Thread wrapper instance for main thread.
Definition: thread.cpp:1271
static void destroy_main()
Destroy main thread wrapper instance.
Definition: thread.cpp:1285
Nao GUI main window.
Definition: naogui.h:44