Example #1
0
/** Normal entry point from OS */
int main(int argc, char** argv)
{
	setbuf(stderr, NULL);

	BPath options;
	if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) {
		options.Append("x-vnd.NetSurf");
	}

	if (!replicated) {
		// create the Application object before trying to use messages
		// so we can open an alert in case of error.
		new NSBrowserApplication;
	}

	const char* messages = "/boot/apps/netsurf/res/en/Messages";

	/* initialise netsurf */
	netsurf_init(&argc, &argv, options.Path(), messages);

    gui_init(argc, argv);
    gui_init2(argc, argv);

	netsurf_main_loop();

	netsurf_exit();

	return 0;
}
Example #2
0
void gui_start() {
	
	if (panJetpack == NULL) {
		gui_init();
	}
	
	panJetpackBorder.pos_x = 5;
	panJetpackBorder.pos_y = 5;
	panJetpack.pos_x = 5;
	panJetpack.pos_y = 5;
	
	panHeart1.pos_x = screen_size.x - 5 - 3*bmap_width(bmapZorroLife) - 3 * 2;
	panHeart2.pos_x = screen_size.x - 5 - 2*bmap_width(bmapZorroLife) - 2 * 2;
	panHeart3.pos_x = screen_size.x - 5 - 1*bmap_width(bmapZorroLife) - 1 * 2;
	panHeart1.pos_y = 5;
	panHeart2.pos_y = 5;
	panHeart3.pos_y = 5;
	txtLifes.pos_x = panHeart1.pos_x - 20;
	txtLifes.pos_y = 5;
	
	panA4Cube.pos_x = (screen_size.x / 2) - (bmap_width(bmapA4Cube) / 2);
	panA4Cube.pos_y = 5;
	txtA4Cube.pos_x = panA4Cube.pos_x - 15;
	txtA4Cube.pos_y = 10;
	
	txtGameOver.pos_x = screen_size.x / 2;
	txtGameOver.pos_y = screen_size.y / 2;	
}
Example #3
0
int main(int argc, char ** argv) {
	dispx = MENU_SCREEN_X*20;
	dispy = MENU_SCREEN_Y*20 + 20;
	if ((dispx > 1000) || (dispy > 1000)) {
		dispx = 1000;
		dispy = 1000*MENU_SCREEN_Y/MENU_SCREEN_X;
	}
	glutInit(&argc, argv); //*must* be called before gui_init
	init_window();
	menu_redraw();
	demo_init();
	gui_init(); //*must* be called before the first menu_keypress()
	int i;
	for (i = 1; i < argc; i++) {
		int x = atoi(argv[i]);
		 if ((x > 0) && (x <= 255)) {
				menu_keypress(x);
		}
	}
	glutMouseFunc(input_mouse_key);
	glutPassiveMotionFunc(input_mouse_move);
	glutSpecialFunc(input_key_special);
	glutKeyboardFunc(input_key_normal);
	glutMainLoop();
	return 0;
}
void rt_init_thread_entry(void *parameter)
{
#ifdef RT_USING_COMPONENTS_INIT
	/* initialization RT-Thread Components */
	rt_components_init();
#endif

	rt_platform_init();

	/* Filesystem Initialization */
#ifdef RT_USING_DFS
	/* mount sd card fat partition 1 as root directory */
	if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
	{
		rt_kprintf("File System initialized!\n");
	}
	else rt_kprintf("File System initialzation failed!\n");
#endif

#ifdef RT_USING_RTGUI
	gui_init();

	picture_show();

	/* initial touch. */
	{
        rt_device_t device;
	    device = rt_device_find("touch");
	    if (device != RT_NULL)
        {
            rt_device_init(device);
        }
	}
#endif /* RT_USING_RTGUI */
}
Example #5
0
int main(int argc, char **argv)
{
    struct options_st opt = { 0, 0, 0, 0, NULL, 1 };

#ifdef DEBUG
    dbg_init();
#endif
    process_options(argc, argv, &opt);

    setverbosity(opt.verbose);

#ifdef DEBUG
    dbg_setdebug(opt.debug);

    char *subsys[] = { "default", "gui", "opengl", "world", NULL };

    dbg_msetsubsysnames(subsys);
    if (opt.mdebug != NULL)
	dbg_parsearg(opt.mdebug);
#endif

    gui_init(opt.width, opt.height, opt.fullscreen);
    gui_loop();
    gui_finish();
}
Example #6
0
File: tests.c Project: kernc/gimp
static Gimp *
gimp_init_for_gui_testing_internal (gboolean     show_gui,
                                    const gchar *gimprc)
{
    GimpSessionInfoClass *klass;
    Gimp                 *gimp;

    /* from main() */
    gimp_log_init ();
    gegl_init (NULL, NULL);

    /* Introduce an error margin for positions written to sessionrc */
    klass = g_type_class_ref (GIMP_TYPE_SESSION_INFO);
    gimp_session_info_class_set_position_accuracy (klass, 5);

    /* from app_run() */
    gimp = gimp_new ("Unit Tested GIMP", NULL, NULL, FALSE, TRUE, TRUE, !show_gui,
                     FALSE, FALSE, TRUE, TRUE, FALSE);
    gimp_set_show_gui (gimp, show_gui);
    units_init (gimp);
    gimp_load_config (gimp, gimprc, NULL);
    gimp_gegl_init (gimp);
    gui_init (gimp, TRUE);
#ifndef G_OS_WIN32
    gimp_init_icon_theme_for_testing ();
#endif
    gimp_initialize (gimp, gimp_status_func_dummy);
    gimp_restore (gimp, gimp_status_func_dummy);

    g_type_class_unref (klass);

    return gimp;
}
Example #7
0
void gui_app_exec( int n )
{
    char fullpath[512];
    strcpy( fullpath, applications[category]->fullpath[n] );

    char id[512];
    strcpy( id, applications[category]->id[n] );

    char exec_name[512];
    strcpy( exec_name, applications[category]->exec_name[n] );

    int clock = applications[category]->clock[n];
    int nox = applications[category]->noX[n];

	gui_clean();

    if ( nox )
    {
        printf( "Application ask noX\n" );

        pnd_apps_exec ( pndrun, fullpath, id, exec_name, fullpath, NULL, clock, PND_EXEC_OPTION_NOX11 );

        exit( 0 );
    }
    else
    {
        printf( "Application do not ask X shutdown\n" );

        pnd_apps_exec ( pndrun, fullpath, id, exec_name, fullpath, NULL, clock, PND_EXEC_OPTION_BLOCK );

        gui_init();
        gui_load();
        //gui_load_preview( category, n );
    }
}
Example #8
0
File: tests.c Project: 1ynx/gimp
static Gimp *
gimp_init_for_gui_testing_internal (gboolean     show_gui,
                                    const gchar *gimprc)
{
  GimpSessionInfoClass *klass;
  Gimp                 *gimp;

  /* from main() */
  g_thread_init(NULL);
  g_type_init();
  gimp_log_init ();

  /* Introduce an error margin for positions written to sessionrc */
  klass = g_type_class_ref (GIMP_TYPE_SESSION_INFO);
  gimp_session_info_class_set_position_accuracy (klass, 5);

  /* from app_run() */
  gimp = gimp_new ("Unit Tested GIMP", NULL, FALSE, TRUE, TRUE, !show_gui,
                   FALSE, TRUE, TRUE, FALSE);
  gimp_set_show_gui (gimp, show_gui);
  units_init (gimp);
  gimp_load_config (gimp, gimprc, NULL);
  base_init (GIMP_BASE_CONFIG (gimp->config),
             FALSE /*be_verbose*/,
             FALSE /*use_cpu_accel*/);
  gui_init (gimp, TRUE);
  gimp_initialize (gimp, gimp_status_func_dummy);
  gimp_restore (gimp, gimp_status_func_dummy);

  g_type_class_unref (klass);

  return gimp;
}
Example #9
0
File: main.c Project: ilm/puae
int main (int argc, char **argv)
{
    init_sdl ();
    gui_init (argc, argv);
    real_main (argc, argv);
    return 0;
}
Example #10
0
/**
 * Main entry point from OS.
 */
int main(int argc, char** argv)
{
	char *messages;
	char *options;

	/* check home directory is available */
	nsgtk_check_homedir();

	respaths = nsgtk_init_resource("${HOME}/.netsurf/:${NETSURFRES}:"GTK_RESPATH":./gtk/res");

	gtk_init(&argc, &argv);
	
        /* set standard error to be non-buffering */
	setbuf(stderr, NULL);

	options = filepath_find(respaths, "Choices");
	messages = filepath_find(respaths, "Messages");

	netsurf_init(&argc, &argv, options, messages);

	free(messages);
	free(options);

	gui_init(argc, argv, respaths);

	netsurf_main_loop();
	
	/* Ensure all scaffoldings are destroyed before we go into exit */
	while (scaf_list != NULL)
		nsgtk_scaffolding_destroy(scaf_list);
	
	netsurf_exit();

	return 0;
}
Example #11
0
File: demo.c Project: kerichsen/asf
int main(void)
{
  init_sys_clocks();

  init_dbg_rs232(FPBA_HZ);

  print_dbg("AVR UC3 DSP DEMO\r\n");

  irq_initialize_vectors();

  // GUI, Controller and DSP process init
  gui_init(FCPU_HZ, FHSB_HZ, FPBA_HZ, FPBB_HZ);
  gui_text_print(GUI_COMMENT_ID, TEXT_IDLE);
  gui_text_print(GUI_FILTER_ID, filter_active_get_description());
  controller_init(FCPU_HZ, FHSB_HZ, FPBA_HZ, FPBB_HZ);
  twi_init();
  dsp_process_init(FCPU_HZ, FHSB_HZ, FPBA_HZ, FPBB_HZ);

  cpu_irq_enable();

  // Main loop
  while (1)
  {
    gui_task();
    controller_task();
    dsp_process_task();
    state_machine_task();
  }
}
Example #12
0
int main( )
{
    gui_init();

	gui_done = 0;

	category = EMULATORS;
	alpha_up = 1;
	alpha = 150;
	reset_scroll_count = 1;

    if ( cfg_pmenu_read() < 1 )
    {
        debug_error( "cfg_pmenu_read failed, exiting..." );
        GLES2D_Quit();
        exit(0);
    }

	if ( cfg_gui_read() < 1 )
    {
        GLES2D_Quit();
        debug_error( "cfg_gui_read failed, exiting..." );
        exit(0);
    }

	gui_load();

	GLES2D_FpsCounterInit();

    nh_countdown = 60;
    debug_func = 0;

    strcpy( now_path, "/media" );

	while( ! gui_done )
	{
        check_rediscover();

		handle_dpad();

		if ( pmenu->effect )
		{
            gui_draw();
            GLES2D_DrawFont( fnt[SMALL], 750, 0, GLES2D_GetFpsChar() );
            GLES2D_SwapBuffers();
            GLES2D_FpsCounterUpdate();
		}

		if( do_quit )
            gui_done = 1;

		//usleep( 10000 );
	}

	gui_clean();

	system( "echo startxfce4 > /tmp/gui.load" );

	return 0;
}
Example #13
0
int main(int argc, char *argv[])
{
	GUIElement *menuBar, *menu;
	gui_init_debug();

	gui_init();
	gui_set_cmd_hander(do_command);
	gui_set_evt_hander(handle_event);
	
	menuBar = gui_new_menubar();
	menu = gui_new_menu("File", file_menu_items, NUM_FILE_MENU_ITEMS);
	gui_add_menu_to_menubar(menuBar, menu);
	menu = gui_new_menu("Edit", edit_menu_items, NUM_EDIT_MENU_ITEMS);
	gui_add_menu_to_menubar(menuBar, menu);
	gMenuBar = menuBar;
	
	gui_add_rect_to_region(&gBottomElement->r);
	gui_start_redraw();
	gui_redraw_all();
	gui_fninish_redraw();
	
	gui_main_loop();
	
	gui_dispose_all_elements();

	gui_end_debug();
	
	color(15, 4, 4);
	totext();
	return 0;
}
Example #14
0
int main(int argc, const char * argv[]) {
    SDL_Event event;

    if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0) {
        printf("SDL_Init failed\n");
        return(1);
    }

    if(video_init() != 0) {
        SDL_Quit();
        return(2);
    }
    
    gui_init();

    while(quit == 0) {
        gui_draw();
        while(SDL_PollEvent(&event)) {
            if(event.type == SDL_QUIT) {
                quit++;
            }
        }
        video_frameend();
    }
    
    gui_kill();

    video_kill();
    SDL_Quit();
    return(0);
}
Example #15
0
int main(int argc, char **argv)
{
#if ENABLE_NLS
    bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
    bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
    textdomain(GETTEXT_PACKAGE);
#endif

    g_thread_init(NULL);
    gdk_threads_init();
    gdk_threads_enter();
    g_atexit(gdk_threads_leave);

    read_opts_preinit(&argc, &argv);

    hash_init();
    g_atexit(hash_deinit);

    gui_init(opts.datadir ? opts.datadir : DATADIR);
    g_atexit(gui_deinit);

    list_init();

    prefs_init();
    g_atexit(prefs_deinit);

    read_opts_postinit();

    gui_run();

    return EXIT_SUCCESS;
}
Example #16
0
DWORD WINAPI _thread(LPVOID lpParameter)
{
    MSG msg = { 0 };

    gui_init();

    f_hhk = SetWindowsHookEx(WH_KEYBOARD_LL, (HOOKPROC)LowLevelKeyboardProc, GetModuleHandle(NULL), 0);

    g_main_tid = GetCurrentThreadId();

restart:
    h3msnake_init("h3msnake2_level.h3m");
    SendMessage(g_hwnd_main, 0x1337, 0, 0);

    f_keycode = 0;
    SetTimer(NULL, 0, 250, _TimerProc);

    while (0 != GetMessage(&msg, NULL, 0, 0))
    {
        if (msg.message == WM_RESTART)
        {
            h3msnake_exit();
            goto restart;
        }
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    ExitThread(0);
}
Example #17
0
File: main.c Project: Cpasjuste/pdm
void gui_app_exec(int n)
{
	pid_t childpid;
	int status;

	int lenght = strlen ( item->exec_path[n] );

	while ( item->exec_path[n][lenght] != '/' )
		lenght--;

	gui_clean();

	if ((childpid = fork()) == -1)
	{
		perror("Error in the fork");
	}
	else if (childpid == 0)
	{
   		if ( execl( pdm_dir_and("exec.sh"), pdm_dir_and("exec.sh"), item->exec_path[n], str_sub( item->exec_path[n], 0, lenght ), NULL) < 0 )
		{
			perror("Exec failed");
		}
	}
	else if (childpid != wait(&status))
	{ 
		perror("A signal occurred before the child exited");
	}

	gui_init();
	gui_load();
}
Example #18
0
/** Entry point from OS.
 *
 * /param argc The number of arguments in the string vector.
 * /param argv The argument string vector.
 * /return The return code to the OS
 */
int
main(int argc, char** argv)
{
	struct browser_window *bw;
	char *options;
	char *messages;

	setbuf(stderr, NULL);

	respaths = fb_init_resource(NETSURF_FB_RESPATH":"NETSURF_FB_FONTPATH);

	options = filepath_find(respaths, "Choices");
	messages = filepath_find(respaths, "messages");

	netsurf_init(&argc, &argv, options, messages);

	free(messages);
	free(options);

	gui_init(argc, argv);

	LOG(("calling browser_window_create"));
	bw = browser_window_create(feurl, 0, 0, true, false);

	netsurf_main_loop();

	browser_window_destroy(bw);

	netsurf_exit();

	return 0;
}
Example #19
0
static void null_leave(struct state *st, struct state *next, int id)
{
    shad_init();
    ball_init();
    geom_init();
    gui_init();
}
Example #20
0
File: main.c Project: peko/tttm2
int main(int argc, char** argv) {

    GLFWwindow* window;

    glfwSetErrorCallback(on_error);

    if (!glfwInit())
        exit(EXIT_FAILURE);

    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);

    window = glfwCreateWindow(800, 600, "show mesh", NULL, NULL);
    if (!window) {
        glfwTerminate();
        exit(EXIT_FAILURE);
    }

    glfwSetKeyCallback(window, on_key);
    glfwSetCursorPosCallback(window, on_mouse);
    glfwSetMouseButtonCallback(window, on_click);
    glfwSetScrollCallback(window, on_scroll);

    glfwMakeContextCurrent(window);
    gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
    glfwSwapInterval(1);

    app_init(argc, argv);
    gui_init(window);

    while (!glfwWindowShouldClose(window)) {
        float ratio;
        int width, height;

        glfwGetFramebufferSize(window, &width, &height);
        ratio = width / (float) height;

        glViewport(0, 0, width, height);
        glClear(GL_COLOR_BUFFER_BIT);

        glfwPollEvents();

        app_draw(ratio);

        gui_logic();
        gui_draw();

        glfwSwapBuffers(window);
    }

    glfwDestroyWindow(window);

    glfwTerminate();

    app_cleanup();
    gui_cleanup();

    exit(EXIT_SUCCESS);
}
//Init for States
int
state_init ()
{
  prev_time = al_get_time ();
  set_shader (identity_shader ());
  gui_init ();
  return handlers[state].proc_init ();
}
Example #22
0
static void null_leave(struct state *st, struct state *next, int id)
{
    mtrl_load_objects();
    shad_init();
    ball_init();
    geom_init();
    gui_init();
}
Example #23
0
int main(int argc, char *argv[])
{
    gtk_init(&argc, &argv);
    
    gui_init();

    return 0;
}
Example #24
0
int main(int argc,char **argv)
{
	pthread_t zputhread;
	pthread_attr_t zputhreadattr;
	void *ret;

	if (argc<2) {
		return help();
	}

	poll_init();

	gui_init();

	zpuino_interface_init();

	if (load_device_map("device.map")<0) {
		fprintf(stderr,"SIMULATOR: Error loading device map\n");
		return -1;
	}

	int infile = open(argv[1],O_RDONLY);
	read(infile,_memory,32768);
	close(infile);

	zpuino_io_post_init();
	gui_post_init();
	// Spawn terminal
 /*
	int pid;
	switch(pid=vfork()) {
	case 0:
		return execl("./terminal/terminal","terminal",uart_get_slave_name(),NULL);
	default:
		break;
	}
   */
/*	if (setup_programmer_port()<0)
		return -1;
  */
	signal(SIGINT,&sign);

	_usp=get_initial_stack_location();

	zpuino_clock_start();

	// start processing thread
	pthread_attr_init(&zputhreadattr);
	pthread_create(&zputhread,&zputhreadattr, zpu_thread, NULL);

	zpu_halt();

	poll_loop();

	pthread_join(zputhread,&ret);

	return 0;
}
Example #25
0
int systest_init(void)
{
    pjsua_logging_config log_cfg;
    pj_status_t status = PJ_SUCCESS;

    status = pjsua_create();
    if (status != PJ_SUCCESS) {
	systest_perror("Sorry we've had error in pjsua_create(): ", status);
	return status;
    }

    pjsua_logging_config_default(&log_cfg);
    log_cfg.log_filename = pj_str(add_path(doc_path, LOG_OUT_PATH));

    pjsua_config_default(&systest.ua_cfg);
    pjsua_media_config_default(&systest.media_cfg);
    systest.media_cfg.clock_rate = TEST_CLOCK_RATE;
    systest.media_cfg.snd_clock_rate = DEV_CLOCK_RATE;
    if (OVERRIDE_AUD_FRAME_PTIME)
	systest.media_cfg.audio_frame_ptime = OVERRIDE_AUD_FRAME_PTIME;
    systest.media_cfg.channel_count = CHANNEL_COUNT;
    systest.rec_id = REC_DEV_ID;
    systest.play_id = PLAY_DEV_ID;
    systest.media_cfg.ec_tail_len = 0;
    systest.media_cfg.snd_auto_close_time = 0;

#if defined(OVERRIDE_AUDDEV_PLAY_LAT) && OVERRIDE_AUDDEV_PLAY_LAT!=0
    systest.media_cfg.snd_play_latency = OVERRIDE_AUDDEV_PLAY_LAT;
#endif

#if defined(OVERRIDE_AUDDEV_REC_LAT) && OVERRIDE_AUDDEV_REC_LAT!=0
    systest.media_cfg.snd_rec_latency = OVERRIDE_AUDDEV_REC_LAT;
#endif

    status = pjsua_init(&systest.ua_cfg, &log_cfg, &systest.media_cfg);
    if (status != PJ_SUCCESS) {
	pjsua_destroy();
	systest_perror("Sorry we've had error in pjsua_init(): ", status);
	return status;
    }

    status = pjsua_start();
    if (status != PJ_SUCCESS) {
	pjsua_destroy();
	systest_perror("Sorry we've had error in pjsua_start(): ", status);
	return status;
    }

    status = gui_init(&root_menu);
    if (status != 0)
	goto on_return;

    return 0;

on_return:
    gui_destroy();
    return status;
}
Example #26
0
/** called when replicated from NSBaseView::Instantiate() */
int gui_init_replicant(int argc, char** argv)
{
	nserror ret;
	BPath options;
	struct netsurf_table beos_table = {
		&beos_misc_table,
		beos_window_table,
		beos_download_table,
		beos_clipboard_table,
                &beos_fetch_table,
                NULL, /* use POSIX file */
                NULL, /* default utf8 */
                NULL, /* default search */
                NULL, /* default web search */
                NULL, /* default low level cache persistant storage */
                beos_bitmap_table,
                beos_layout_table
	};

        ret = netsurf_register(&beos_table);
        if (ret != NSERROR_OK) {
		die("NetSurf operation table failed registration");
        }

	if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) {
		options.Append("x-vnd.NetSurf");
	}

	/* initialise logging. Not fatal if it fails but not much we
	 * can do about it either.
	 */
	nslog_init(nslog_stream_configure, &argc, argv);

	// FIXME: use options as readonly for replicants
	/* user options setup */
	ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default);
	if (ret != NSERROR_OK) {
		// FIXME: must not die when in replicant!
		die("Options failed to initialise");
	}
	nsoption_read(options.Path(), NULL);
	nsoption_commandline(&argc, argv, NULL);

	/* common initialisation */
	BPath messages = get_messages_path();
        ret = messages_add_from_file(messages.Path());

        ret = netsurf_init(NULL);
	if (ret != NSERROR_OK) {
		// FIXME: must not die when in replicant!
		die("NetSurf failed to initialise");
	}

	gui_init(argc, argv);

	return 0;
}
Example #27
0
/*
 * This function is executed befor the GTK Mainwindows is displayed and befor the GTK Main Loop starts
 */
void init ()
{
	// Init Filter and limits
	feature_filters = linkedlist_new();
	table_filters = linkedlist_new();

	// Init some GUI Stuff
	gui_init();
}
Example #28
0
static void null_leave(struct state *st, struct state *next, int id)
{
    part_init();
    shad_init();
    ball_init();
    item_init();
    geom_init();
    gui_init();
    hud_init();
}
Example #29
0
int
main(void)
{
  halInit();
  chSysInit();

  get_device_id();

  /* start stdout port */
  sdStart(SD_STDIO, NULL);

  xflash_init();
  cmdline_init();

  rngStart(&RNGD);

  app_cfg_init();

  check_for_faults();

  gfx_init();
  touch_init();

  sensor_init(SENSOR_1, SD_OW1);
  sensor_init(SENSOR_2, SD_OW2);

  temp_control_init(CONTROLLER_1);
  temp_control_init(CONTROLLER_2);

  ota_update_init();
  net_init();
  web_api_init();
  sntp_init();
  gui_init();
  thread_watchdog_init();

  create_home_screen();

  recovery_screen_create();

  screen_saver_create();

  if (palReadPad(PORT_SELF_TEST_EN, PAD_SELF_TEST_EN) == 0) {
    widget_t* self_test_screen = self_test_screen_create();
    gui_push_screen(self_test_screen);
  }

  recovery_img_init();

  while (TRUE) {
    cmdline_restart();

    toggle_LED1();
  }
}
Example #30
0
int main (int argc, char *argv[]) {
  gui g;

  gtk_init (&argc, &argv);
  gui_init (&g);

  gtk_widget_show_all (g.window);
  gtk_main ();

  exit (EXIT_SUCCESS);
}