set_position(Gtk::WIN_POS_CENTER); $splash->set_resizable(false); $splash->set_decorated(false); $splash->set_skip_taskbar_hint(true); $splash->set_skip_pager_hint(true); $splash->set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN); $pixbuf = GdkPixbuf::new_from_file(dirname(__FILE__).'/images/phpgtk.png'); list($pixmap, $mask) = $pixbuf->render_pixmap_and_mask(); list($width, $height) = $pixmap->get_size(); $splash->set_app_paintable(true); $splash->set_size_request($width, $height); $splash->realize(); if($mask instanceof GdkPixmap) { $splash->shape_combine_mask($mask, 0, 0); } $splash->window->set_back_pixmap($pixmap, false); $label = new gtklabel(); $progress = new gtkprogressbar(); $steps = 6; $vbox = new gtkvbox(); $vbox->pack_end($label,false); $vbox->pack_end($progress = new gtkprogressbar(),false); $splash->add($vbox); $splash->show_all(); $label->set_text("Starting application"); $progress->set_fraction($progress->get_fraction() + (1 / $steps)); while(Gtk::events_pending()) Gtk::main_iteration(); if(substr(PHP_OS,0,3) == 'WIN'){ $label->set_text("attempting to start gconfd-2"); $progress->set_fraction($progress->get_fraction() + (1 / $steps)); while(Gtk::events_pending()) Gtk::main_iteration(); $descriptorspec = array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "w")); $process = proc_open('start /b gconfd-2.exe', $descriptorspec, $pipes); if (is_resource($process)) { $label->set_text("gconfd-2 started"); $progress->set_fraction($progress->get_fraction() + (1 / $steps)); while(Gtk::events_pending()) Gtk::main_iteration(); $label->set_text("Initilizing GtkHTML"); $progress->set_fraction($progress->get_fraction() + (1 / $steps)); while(Gtk::events_pending()) Gtk::main_iteration(); $html = new GtkHTML(); $html->destroy(); $label->set_text("GtkHTML Initilized"); $progress->set_fraction($progress->get_fraction() + (1 / $steps)); while(Gtk::events_pending()) Gtk::main_iteration(); } } $label->set_text("Do More Tasks"); $progress->set_fraction($progress->get_fraction() + (1 / $steps)); while(Gtk::events_pending()) Gtk::main_iteration(); sleep(1); $splash->destroy(); ?>