Hi All,
Can we execute PHP-GTK2 application through Apache web server by placing the abc.php file in htdocs and then run form the webserver by giving
http://localhost/abc.php?
Can I implement GtkWindow in normal php which runs through webserver?
I had downloaded a php file from net which has the functionality to blink a window in task bar. I need to implement this functionality in my Php script that runs through Apache web server.
Please suggest me how can I achieve this.
Please find code below.
<?php
class bobWindow extends GtkWindow {
private $label;
public function __construct() {
parent::__construct();
$this->label = new GtkLabel('Minimize this window to test.');
$this->set_size_request(300,200);
$this->set_title('Blink Taskbar Entry Demo');
$this->connect_simple('delete-event',array($this,'on_quit'));
$this->connect('window-state-event',array($this,'on_iconify'));
//. you must test for when the window is brought back into focus for
//. the purpose of turning the taskbar blinking off.
$this->connect_simple('focus-in-event',array($this,'on_focus'));
$this->add($this->label);
$this->show_all();
return;
}
public function on_quit() {
$this->hide();
Gtk::main_quit();
return;
}
public function on_iconify($w,$e) {
if(($e->new_window_state & Gdk::WINDOW_STATE_ICONIFIED)) {
//. we want to wait for two seconds after before we start to blink.
Gtk::timeout_add(2000,array($this,'init_blink'));
}
return;
}
public function on_focus() {
//. stop blink.
$this->set_urgency_hint(false);
return;
}
public function init_blink() {
//. start blink.
$this->set_urgency_hint(true);
return false;
}
}
$window = new bobWindow;
Gtk::main();
$window->destroy();
unset($window);
?>
Thanks in Advance,
Praveen.