Пример #1
0
int main (int argc, char *argv[])
{
  gtk_set_locale ();
  gtk_init (&argc, &argv);

  bfl_launcher_dialog = create_bfl_launcher_dialog ();
  gtk_widget_show (bfl_launcher_dialog);

  /* I like the launcher to not always start with default values... it's
     better if it reads your ~/.bomnsrc and adjusts itself to it */
  load_bomns_rc();

  gtk_main ();
  return 0;
}
int
main (int argc, char *argv[])
{
 	GtkWidget *window;
	
	gtk_set_locale ();
	gtk_init (&argc, &argv);

	window = create_window ();
	create_completion();
	
	gtk_widget_show_all (window);

	gtk_main ();
	return 0;
}
Пример #3
0
int
main (int argc, char *argv[])
{
 	GtkWidget *window1;


	
	gtk_set_locale ();
	gtk_init (&argc, &argv);

	window1 = my_glade_new();
	gtk_widget_show (window1);

	gtk_main ();
	return 0;
}
Пример #4
0
int main(int argc, char **argv) {
  
  FILE *ftmp = NULL;
  char guipath[512];
//  char cwd[512];

//  getcwd(cwd,511);
//  chdir("/usr/share/dynebolic/splash");

  sprintf(guipath,"dynesplash.glade");

  ftmp = fopen(guipath,"r");
  if(!ftmp) {
    sprintf(guipath,"/usr/share/dyne/splash/dynesplash.glade");
    ftmp = fopen(guipath,"r");
  }
  if(!ftmp) {
    fprintf(stdout,"file missing: dynesplash.glade\n");
    fprintf(stdout,"fatal error: GUI description not found");
    exit(0);
  } else fclose(ftmp);

  /* internationalization stuff */
  bindtextdomain ("dynesplash", "/usr/share/dyne/splash");
  textdomain ("dynesplash");
  gtk_set_locale ();

  gtk_init(&argc,&argv);
  gui = glade_xml_new(guipath,NULL,NULL);

  /* connect callbacks automatically  */
  glade_xml_signal_autoconnect(gui);
  
  /* ====== connect callbacks manually */
    
  // credits
  CONNECT_ARG("rastasoft_button","clicked",goto_url,www_rastasoft);
  CONNECT_ARG("puredyne_button","clicked",goto_url,www_puredyne);
  CONNECT_ARG("eu_button","clicked",goto_url,www_europe);
  CONNECT_ARG("gnu_button","clicked",goto_url,www_gnu);
  CONNECT_ARG("morecredits_button","clicked",goto_url,www_lulz);

  gtk_main();

  exit(1);
}
Пример #5
0
int
main(int argc, char **argv)
{
	GtkVi	*vi;

	gtk_set_locale ();

	gtk_init (&argc, &argv);

	gtk_vi_init(&vi, argc, argv);

	create_toplevel(vi);

	gtk_main();

	return 0;
}
Пример #6
0
int
main (int argc, char *argv[])
{
  gchar *path, *path1, *path2;
  
#ifdef ENABLE_NLS
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);
#endif
  
  gtk_set_locale ();
  gtk_init (&argc, &argv);

  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
  path = g_path_get_dirname(argv[0]);
  path1 = g_build_filename(path, "pixmaps", NULL);
  path2 = g_build_filename(path, "..", "pixmaps", NULL);
  add_pixmap_directory (path1);
  add_pixmap_directory (path2);
  add_pixmap_directory (path);
  g_free(path);
  g_free(path1);
  g_free(path2);

  /*
   * The following code was added by Glade to create one of each component
   * (except popup menus), just so that you see something after building
   * the project. Delete any components that you don't want shown initially.
   */
  winMain = create_winMain ();
  
  init_stuff (argc, argv);
  gtk_window_set_icon(GTK_WINDOW(winMain), create_pixbuf("xournal.png"));
  
  gtk_main ();
  
  if (bgpdf.status != STATUS_NOT_INIT) shutdown_bgpdf();

  save_mru_list();
  autosave_cleanup(&ui.autosave_filename_list);
  if (ui.auto_save_prefs) save_config_to_file();
  
  return 0;
}
Пример #7
0
int main(int argc, char *argv[]) 
{
    GtkWidget *window;
    GtkWidget *button;

    /* 初期化: ロケール設定 */ 
    gtk_set_locale();

    /* 初期化: オプションの処理 */
    gtk_init( &argc, &argv );

    /* 初期化: rc ファイルの読み込み */
    gtk_rc_parse("./gtkrc");

    /* トップレベルウィンドウを生成 */
    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

    gtk_signal_connect(GTK_OBJECT(window), "delete_event",
		       GTK_SIGNAL_FUNC(CloseAppWindow), NULL);

    /* コンテナ内のオブジェクトの周りにすき間を作成 */
    gtk_container_border_width(GTK_CONTAINER(window), 15);

    /* ボタンの作成 */
    button = gtk_button_new_with_label("Hello, World.\n");
    
    g_signal_connect(GTK_OBJECT(button), "clicked",
		       GTK_SIGNAL_FUNC(button_was_clicked), NULL);

    /* ボタンの配置 */
    gtk_container_add(GTK_CONTAINER(window), button);
    
    /* ボタンの表示 */
    gtk_widget_show(button);

    /* ウィンドウの表示 */
    gtk_widget_show(window);

    /* */
    gtk_main();

    /* 終了ステータスコード */

    return 0;
}
Пример #8
0
int
main (int argc, char *argv[])
{
  if(argc == 1) {
	  GtkWidget *MFmgr;

#ifdef ENABLE_NLS
	  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
	  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	  textdomain (GETTEXT_PACKAGE);
#endif

	  gtk_set_locale ();
	  gtk_init (&argc, &argv);

	  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");

	  /*
	   * The following code was added by Glade to create one of each component
	   * (except popup menus), just so that you see something after building
	   * the project. Delete any components that you don't want shown initially.
	   */
	  MFmgr = create_MFmgr ();
	  gtk_widget_show (MFmgr);

	  gtk_main ();
  } else if(argc == 4) {
	  writeFanSpeed(atoi(argv[1]));
	  writeKeypad(atoi(argv[2]));
	  switch(atoi(argv[3])) {
		  case 0:
			  system("synclient TouchpadOff=1");
			  break;
		  case 1:
			  system("synclient TouchpadOff=2");
			  break;
		  case 2:
			  system("synclient TouchpadOff=0");
			  break;
		  default: ;
	  }
  } else ;

	  return 0;
}
int main (int argc, char *argv[])
{
    Image im;
    string buf;

    gtk_set_locale();
    gtk_init(&argc, &argv);

    parse_command_line(argc, argv, im);

    string title("temp");
    while (std::cin >> buf && buf != "exit" && buf != "q" && buf != "quit") {
        eval(buf, im);
        display(im, title.c_str());
    }

    return 0;
}
Пример #10
0
int UI_Init(int argc, char **argv)
{
	initTranslator();

  uint32_t w,h;
    if(!g_thread_supported())
        g_thread_init(NULL);
    gdk_threads_init();
    gdk_threads_enter();
    gtk_set_locale();
    global_argc=argc;
    global_argv=argv;
      
    gtk_init(&global_argc, &global_argv);
    gdk_rgb_init();
    
    
}
Пример #11
0
/*
 *===========================================================================
 * M A I N
 *===========================================================================
 */
int
main(int argc, char **argv)
{
    gtk_set_locale();
    gtk_init(&argc, &argv);

    GtkWidget* mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title(GTK_WINDOW(mainwin), "Chi Siahu");
    g_signal_connect(
        G_OBJECT(mainwin), "delete_event", G_CALLBACK(delete_event), NULL);
    g_signal_connect(
        G_OBJECT(mainwin), "destroy", G_CALLBACK(destroy), NULL);

    gtk_widget_show_all(mainwin);
    gtk_main();

    return 0;
}
Пример #12
0
int
main (int argc, char *argv[])
{
  GtkWidget *MainFrame;

#ifdef ENABLE_NLS
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);
#endif

  gtk_set_locale ();
  gtk_init (&argc, &argv);

  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");

  /*
   * The following code was added by Glade to create one of each component
   * (except popup menus), just so that you see something after building
   * the project. Delete any components that you don't want shown initially.
   */
  MainFrame = create_MainFrame ();
  gtk_widget_show (MainFrame);
  GtkWidget* mylist = lookup_widget(MainFrame,"ls_box");
  char* box[5][1];
  int i;
  box[0][0] = "收件箱";
  box[1][0] = "已发邮件";
  box[2][0] = "垃圾箱";
  box[3][0] = "发件箱";
  box[4][0] = "草稿箱";


  for(i = 0; i < 5; i++)
  {
  	gtk_clist_append((GtkCList*)mylist,box[i]);
  }
  addfunc();
 // strcpy(storename,"10717365");
 // strcpy(storeaddress,"*****@*****.**");
 // strcpy(storepassword,"6188699");
  gtk_main ();
  return 0;
}
Пример #13
0
int
main (int argc, char *argv[])
{
  GtkWidget *window;

#ifdef ENABLE_NLS
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);
#endif

  gtk_set_locale ();
  gtk_init (&argc, &argv);

  add_pixmap_directory ("/usr/share/icons/Tango/scalable/apps");
  add_pixmap_directory ("/usr/share/icons/Tango/scalable/devices");
  add_pixmap_directory (".");

  bm.window = create_window ();

  bm.has_bm = g_file_test ("/usr/sbin/boot-mode", G_FILE_TEST_IS_EXECUTABLE);
  bm.mode = get_mode ();

  bm.ignore_edits = TRUE;

  gtk_image_set_pixel_size (GTK_IMAGE (WIDGET ("normal_image")), 128);
  gtk_image_set_pixel_size (GTK_IMAGE (WIDGET ("update_image")), 128);

  VISIBLE ("warning_box", !bm.has_bm);
  ENABLED ("normal_button", bm.has_bm);
  ENABLED ("update_button", bm.has_bm);
  TOGGLED ("normal_button", bm.mode == NORMAL_MODE);
  TOGGLED ("update_button", bm.mode == UPDATE_MODE);

  bm.ignore_edits = FALSE;

  gtk_dialog_run (GTK_DIALOG (bm.window));

  if (bm.mode != (ISTOGGLED ("normal_button") ? NORMAL_MODE : UPDATE_MODE)) {
      update_boot_mode ();
  }
  
  return 0;
}
Пример #14
0
int main(int argc, char **argv) {
  struct sigaction sa;
  char *LogFile;

  memset(&sa, 0, sizeof(struct sigaction));
  sa.sa_handler = SIG_DFL;
  sa.sa_flags |= SA_RESTART;
  if (sigaction(SIGCHLD, &sa, NULL) != 0) {
    Error("sigaction(2) failure");
  }

  gtk_init(&argc, &argv);
  gtk_panda_init(&argc, &argv);
  gtk_set_locale();

  bindtextdomain(PACKAGE, LOCALEDIR);
  textdomain(PACKAGE);

  LogFile = getenv("GLPUSH_LOGFILE");
  if (LogFile == NULL) {
    InitLogger("glprint");
  } else {
    InitLogger_via_FileName(LogFile);
  }
  TempDir = getenv("GLPUSH_TEMPDIR");
  if (TempDir == NULL) {
    InitTempDir("glprint");
  } else {
    InitTempDir_via_Dir(TempDir);
  }

  gl_config_init();
  InitDesktop();

  execute();

  gtk_timeout_add(30 * 1000, push_action_exit, NULL);
  gtk_main();

  sleep(3);

  return 0;
}
Пример #15
0
int
main (int argc, char *argv[])
{
  GtkWidget *window;
  GtkWidget *keyname;
  GtkWidget *fileselection;

  if (argc > 1) db_file = g_strdup(argv[1]);

  gtk_set_locale ();
  gtk_init (&argc, &argv);

  main_window = create_window ();
  new_db(main_window, db_file);
  init_type_menu();
  gtk_widget_show (main_window);

  gtk_main ();
  return 0;
}
Пример #16
0
int
main (int argc, char *argv[])
{
	if(argc == 1)
	{
		  GtkWidget *window1;

		/*#ifdef ENABLE_NLS
		  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
		  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
		  textdomain (GETTEXT_PACKAGE);
		#endif
		*/
		  gtk_set_locale ();
		  gtk_init (&argc, &argv);

		//  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
		  add_pixmap_directory ("/home/vilhena/MCC/PL/trabalhos/trabalho1/pixmaps");
  		  add_pixmap_directory ("/home/biosystem/Desktop/trabalho1/pixmaps");

		  /*
		   * The following code was added by Glade to create one of each component
		   * (except popup menus), just so that you see something after building
		   * the project. Delete any components that you don't want shown initially.
		   */
		  window1 = create_window1 ();
		  gtk_widget_show (window1);

		  gtk_main ();
	}
	else 
	{
		char * temp = (char *)funcao(argc,argv);
		
		if(temp != NULL)
			printf("%s\n",temp);
			
		free(temp);
	}
  return 0;
}
Пример #17
0
	int main( int   argc, char *argv[] )
	{
		GtkWidget *window;
		GtkWidget *fixed;
		GtkWidget *button;
		gint i;

		//初始化
		gtk_set_locale();
		gtk_init(&argc, &argv);
     
		//建立根窗口
		window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
		gtk_window_set_title(GTK_WINDOW(window), "Fixed Container");
		gtk_widget_set_usize(window, 500, 400);
		gtk_signal_connect (GTK_OBJECT (window), "destroy",
			GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
		gtk_container_set_border_width (GTK_CONTAINER (window), 10);

		//建立定位布局容器
		fixed = gtk_fixed_new();
		gtk_container_add(GTK_CONTAINER(window), fixed);
		gtk_widget_show(fixed);
   
		for (i = 1 ; i <= 3 ; i++) {
			char buf[80];
			sprintf(buf, "按钮 %d", i);
			//建立按钮
			button = gtk_button_new_with_label(buf);
			//建立按钮回调
			gtk_signal_connect (GTK_OBJECT (button), "clicked",
				GTK_SIGNAL_FUNC (move_button), fixed);
			//把按钮放到容器中
			gtk_fixed_put (GTK_FIXED (fixed), button, i*50, i*50);
			gtk_widget_show (button);
		}

		gtk_widget_show (window);
		gtk_main ();
		return(0);
	}
Пример #18
0
int main(int argc, char *argv[])
{
#ifdef ENABLE_NLS
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);
#endif

	gtk_set_locale();
	gtk_init(&argc, &argv);

	add_pixmap_directory(PACKAGE_PIXMAPS_DIR);

	xneur_restart();

	create_tray_icon(NULL, TRUE);

	gtk_main();

	return EXIT_SUCCESS;
}
Пример #19
0
int main (int argc, char *argv[])
{
 	GtkWidget *window;


#ifdef ENABLE_NLS
	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
#endif

	
	gtk_set_locale ();
	gtk_init (&argc, &argv);

	window = create_window ();
	gtk_widget_show_all (window);

	gtk_main ();
	return 0;
}
Пример #20
0
int
main (int argc, char *argv[])
{
  GtkWidget *window1;

  gtk_set_locale ();
  gtk_init (&argc, &argv);

  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");

  /*
   * The following code was added by Glade to create one of each component
   * (except popup menus), just so that you see something after building
   * the project. Delete any components that you don't want shown initially.
   */
  window1 = create_window1 ();
  gtk_widget_show (window1);

  gtk_main ();
  return 0;
}
Пример #21
0
int
main (int argc, char **argv)
{
    GtkWidget *win;
    GtkStyle *style = 0;

    gtk_set_locale();
    gtk_init (&argc, &argv);
    win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    style = gtk_rc_get_style (win);
    if (style == 0)
	style = gtk_widget_get_style (win);
    if (style != 0)
    {
	if (style->rc_style != 0)
	    print_rc_style (style->rc_style, style);
	else
	    print_style (style);
    }
    return 0;
}
Пример #22
0
int main (int argc, char *argv[])
{
	GtkWidget *window1;

	gtk_set_locale ();
	gtk_init (&argc, &argv);

	initialize_stuff();

	/*
	 * The following code was added by Glade to create one of each component
	 * (except popup menus), just so that you see something after building
	 * the project. Delete any components that you don't want shown initially.
	 */
	window1 = create_windowMain ();
	gtk_widget_show (window1);

	LoadUSBTree(0);
	gtk_main ();
	return 0;
}
Пример #23
0
/*
 * toolkit
 */
BOOL
gui_gtk_arginit(int *argcp, char ***argvp)
{
	char buf[MAX_PATH];
	char *homeenv;

	gtk_set_locale();
	gtk_init(argcp, argvp);

	homeenv = getenv("HOME");
	if (homeenv) {
		g_snprintf(buf, sizeof(buf), "%s/.np2/gtkrc", homeenv);
		gtk_rc_add_default_file(buf);

		g_snprintf(buf, sizeof(buf), "%s/.np2/accels", homeenv);
		if (g_file_test(buf, G_FILE_TEST_IS_REGULAR))
			gtk_accel_map_load(buf);
	}

	return SUCCESS;
}
Пример #24
0
int
main(int argc, char *argv[])
{
    setlocale(LC_CTYPE, "");
    bindtextdomain(PROJECT_NAME, LOCALEDIR);
    textdomain(PROJECT_NAME);

    gtk_set_locale();
    gtk_init(&argc, &argv);
    XSetLocaleModifiers("");
    XSetErrorHandler((XErrorHandler) handle_error);
    fb_init();
    do_argv(argc, argv);
    profile_file = g_build_filename(g_get_user_config_dir(),
                                    "fbpanel", profile, NULL);
    ensure_profile();
    gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), IMGPREFIX);
    signal(SIGUSR1, sig_usr1);
    signal(SIGUSR2, sig_usr2);

    do {
        the_panel = p = g_new0(panel, 1);
        p->xc = xconf_new_from_file(profile_file, profile);
        if (!p->xc)
            exit(1);

        panel_start(p->xc);
        if (config)
            configure(p->xc);
        gtk_main();
        panel_stop(p);
        //xconf_save_to_profile(cprofile, xc);
        xconf_del(p->xc, FALSE);
        g_free(p);
        DBG("force_quit=%d\n", force_quit);
    } while (force_quit == 0);
    g_free(profile_file);
    fb_free();
    exit(0);
}
Пример #25
0
int
main (int argc, char *argv[])
{

#ifdef ENABLE_NLS
  bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
  textdomain (PACKAGE);
#endif

  gtk_set_locale ();
  gtk_init (&argc, &argv);

  add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps");
  add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps");

   e = evas_new();
   evas_set_output_method(e, RENDER_METHOD_ALPHA_SOFTWARE);
   {
     Visual *vis;
     Colormap cmap;
   
     vis = evas_get_optimal_visual(e, GDK_WINDOW_XDISPLAY(GDK_ROOT_PARENT()));
     gdk_vis = gdkx_visual_get(XVisualIDFromVisual(vis));
     cmap = evas_get_optimal_colormap(e, GDK_WINDOW_XDISPLAY(GDK_ROOT_PARENT()));
     gdk_cmap = gdkx_colormap_get(cmap);
     /* workaround for bug in gdk - well oversight in api */
     ((GdkColormapPrivate *)gdk_cmap)->visual = gdk_vis;
   }

  /*
   * The following code was added by Glade to create one of each component
   * (except popup menus), just so that you see something after building
   * the project. Delete any components that you don't want shown initially.
   */
  mainwin = create_mainwin ();
  gtk_widget_show (mainwin);

  gtk_main ();
  return 0;
}
Пример #26
0
/*****************************************************************************
 * GtkMain: Gtk+ thread
 *****************************************************************************
 * this part of the interface is in a separate thread so that we can call
 * gtk_main() from within it without annoying the rest of the program.
 *****************************************************************************/
static void GtkMain( vlc_object_t *p_this )
{
    /* gtk_init needs to know the command line. We don't care, so we
     * give it an empty one */
    static char  *p_args[] = { "", NULL };
#if defined(MODULE_NAME_IS_gtk_main) || defined(MODULE_NAME_IS_gtk2_main)
    static char **pp_args  = p_args;
#endif
    static int    i_args   = 1;

    /* FIXME: deprecated ? */
#if defined(MODULE_NAME_IS_gtk2_main) || defined(MODULE_NAME_IS_gnome2_main)
    gdk_threads_init();
#endif

#if defined(MODULE_NAME_IS_gnome_main)
    gnome_init( p_this->p_vlc->psz_object_name, VERSION, i_args, p_args );
#elif defined(MODULE_NAME_IS_gnome2_main)
    gnome_program_init( PACKAGE, VERSION, LIBGNOMEUI_MODULE,
                        i_args, p_args,
                        GNOME_PARAM_APP_DATADIR, "",//PACKAGE_DATA_DIR,
                        NULL );
#else
    gtk_set_locale();
    gtk_init( &i_args, &pp_args );
#endif

    gdk_threads_enter();

    vlc_thread_ready( p_this );

    /* If we don't add this simple timeout, gtk_main remains stuck if
     * we try to close the window without having sent any gtk event. */
    gtk_timeout_add( INTF_IDLE_SLEEP / 1000, foo, p_this );

    /* Enter Gtk mode */
    gtk_main();

    gdk_threads_leave();
}
Пример #27
0
int
main (int argc, char *argv[])
{ 
  GtkWidget *window3D;

  /* MALLOC_TRACE for gnu systems */

  signal (SIGUSR1, enable);
  signal (SIGUSR2, disable);

  /*
  mtrace ();
  */
  gtk_set_locale ();

  /* This is necessary so that numeric text files are read in 
	  properly. 
  */

  setlocale(LC_NUMERIC,"C");

  /* TODO: need to look for gtkrc file, currently we just look in 
	  the source dir since we don't install this version anyway
  */
  gtk_rc_add_default_file(PACKAGE_SOURCE_DIR "/gtk/gtkrc");


  gtk_init (&argc, &argv);

  
  window3D = new_window3D(NULL);

  /* when we handle command line options we will change this */
  on_open1_activate(NULL, (gpointer) window3D);

  gtk_main ();


  return 0;
}
Пример #28
0
void	init_gtk_gui( int argc, char **argv )
{
	// GTK+ を初期化

	gtk_set_locale();

#if	defined( HAVE_G_THREAD_INIT )
	g_thread_init( NULL );
#endif
	gdk_threads_init();

	gtk_init( &argc, &argv );
	gdk_rgb_init();

	gPcgDun.nTileSizeRate = g_graph_scale_rate;

	init_main_win();

	// SDL を初期化

	gMusic.init();
	gSound.init();
	gJoystick.init();

	// タイマーの設定

	ena_timer();

	// タイトル画像を描画

	gPcgDun.initTitle();
	change_scene_gui( SCENE_N_TITLE );
	gPcgDun.drawTitle();

	// グラフィック設定を選択

	gSelConf.init();
	gSelConf.draw();
}
Пример #29
0
gint
mca_init (int argc, char **argv)
{
#ifdef ENABLE_NLS
	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
#endif
	gtk_set_locale ();

	mca = &app;
	memset(mca, 0, sizeof(app));

	parse_args(mca, argc, argv);

	//	parse_conf_file(mca, confname);
	init_dir_files(mca);

	//init command execution - is this necessary?
	mca_command_init();
	//init blocker
	mca_blocker_init(&mca->blocker);
	//init networking  
	mca_network_init(&mca->cnxn, (cmd_callback_t)mca_exec_net_command,
									 (status_callback_t) mca_net_status_report);

	//init other startup variables
	app.timeout_len = 0;
	app.bool_active   = FALSE;
	app.start_time  = 0;
	app.upd_data    = NULL;
	app.login_mode  = 0;
	app.login_state = 0;
	app.mca_sec_count = 0;
	app.poll_interval = 10;  //default poll interval

	return 0;
}
Пример #30
0
/*
 *===========================================================================
 * M A I N
 *===========================================================================
 */
int
main(int argc, char **argv)
{
    gtk_set_locale();
    gtk_init(&argc, &argv);

    GtkWidget* mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title(GTK_WINDOW(mainwin), "Chi Siahu");
    g_signal_connect(
        G_OBJECT(mainwin), "delete_event", G_CALLBACK(delete_event), NULL);
    g_signal_connect(
        G_OBJECT(mainwin), "destroy", G_CALLBACK(destroy), NULL);

    GtkWidget* menubar = createMenubar();
    GtkWidget* toolbar = createToolbar();
    GtkWidget* body = createBody();
    GtkWidget* statusbar = createStatusbar();

    GtkWidget* box = gtk_vbox_new(FALSE, 0);

    gtk_box_pack_start(GTK_BOX(box), menubar, FALSE, FALSE, 2);
    gtk_box_pack_start(GTK_BOX(box), toolbar, FALSE, FALSE, 2);
    gtk_box_pack_start(GTK_BOX(box), body, TRUE, TRUE, 0);
    gtk_box_pack_start(GTK_BOX(box), statusbar, FALSE, FALSE, 0);

    //gtk_container_set_border_width(GTK_CONTAINER(mainwin), 5);

    gtk_container_add(GTK_CONTAINER(mainwin), box);

    fft_in = (double *) fftw_malloc(sizeof(double) * N);
    fft_out = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * M);
    fft_plan = fftw_plan_dft_r2c_1d(N, fft_in, fft_out, FFTW_MEASURE);

    gtk_widget_show_all(mainwin);
    gtk_main();

    return 0;
}