GTKApplicationHandler.cpp
Go to the documentation of this file.
1 // ****************************************************************************
2 // Filename: GTKApplicationHandler.cpp
3 // Author: Florian Hecht
4 // Date: 2009
5 // ****************************************************************************
6 
7 
9 
10 #include <locale.h>
11 
12 #include <gtk/gtk.h>
13 #include <gtk/gtkmain.h>
14 
15 static char app_name[] = "IVT_APPLICATION\0";
16 static int my_argc = 1;
17 static char *my_argv[2] = {app_name, NULL};
18 
20 
22 {
23  if (argv != NULL)
24  {
25  gtk_init(&argc, &argv);
26  }
27  else
28  {
29  char **ptr = my_argv;
30  gtk_init(&my_argc, &ptr);
31 
32  }
33 
34  // undo the setting of the locale by GTK
35  // this makes dialogs appear in english on any system
36  // but it doesn't screw with sscanf and fscanf, which
37  // is more important to us
38  setlocale(LC_ALL, "C");
39 
41  m_bExit = false;
42 }
43 
45 {
47 }
48 
50 {
51  while (gtk_events_pending())
52  gtk_main_iteration();
53 
54  return m_bExit;
55 }
56 
58 {
59 
60 }
static char * my_argv[2]
static CGTKApplicationHandler * m_pGTKApplicationHandler
static char app_name[]
static int my_argc
CGTKApplicationHandler(int argc=0, char **argv=0)


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:28