Re: [Vala] Exit out of a Vala OpenGL program by using the ESC key



On Thu, 2013-07-04 at 11:32 -0500, Thomas F Steinhauer wrote:
Ok,

This is a tough one to figure out.  This code does not work:

void keyboard(uchar key, int x, int y) {
     switch (key) {
         case 27:
             exit(0); break;
         default : break;
     }
}

I understand that the exit(0) call does not work in vala, so what do I 
replace it with so that the program can be ended without having to click 
the X on the window?

exit is bound as GLib.Process.exit.  And Posix.exit.


-Evan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]