コード例 #1
0
 function killwindow(&$window, &$class)
 {
     if ($class) {
         $class->quit();
     } else {
         $window->destroy();
     }
     gtk::main_quit();
 }
コード例 #2
0
ファイル: timeout.php プロジェクト: jenalgit/roadsend-php
function callback($data)
{
    static $i = 0;
    if ($i < 1000) {
        $i++;
        echo "callback called\n";
        return TRUE;
    } else {
        echo "callback finished, data was: {$data}\n";
        gtk::main_quit();
    }
}
コード例 #3
0
function shutdown()
{
    print "Shutting down...\n";
    gtk::main_quit();
}
コード例 #4
0
ファイル: tempconv-g.php プロジェクト: SandyS1/presentations
function on_exit_clicked($button)
{
    /* exit the main loop */
    gtk::main_quit();
}
コード例 #5
0
ファイル: Gtk.php プロジェクト: alexzita/alex_blog
 /**
  * Checks to see if the file has been saved before destroying the
  * main window.
  * 
  * The user should save their file before the application closes.
  * If they have not, they will be prompted to save or close any
  * way.
  *
  * This method will also kill the main gtk loop if told to. If 
  * this class is imbedded in another class, you probably don't
  * want to do that. Pass false to the constructor to prevent 
  * this from happening.
  *
  * @param  boolean $killMainLoop
  * @return void
  * @access public
  */
 function checkBeforeQuit($killMainLoop)
 {
     // Check to see if the file was saved.
     if (!$this->saved) {
         // Prompt the user with a GtkDialog window.
         $dialog =& new GtkDialog();
         $vBox = $dialog->vbox;
         $vBox->pack_start(new GtkLabel('Your package file has not been saved.' . ' Would you like to save it now?'));
         $dialog->show_all();
         gtk::main();
     }
     // Kill the main loop if requested.
     if ($killMainLoop) {
         return gtk::main_quit();
     } else {
         return true;
     }
 }
コード例 #6
0
ファイル: clock.php プロジェクト: SandyS1/presentations
function destroy($window)
{
    gtk::main_quit();
}