Re: run a new application
- From: Michael Torrie <torriem chem byu edu>
- To: sunzysjzri <sunzysjzri gmail com>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: run a new application
- Date: Thu, 23 Nov 2006 19:39:36 -0700
On Fri, 2006-11-24 at 10:26 +0800, sunzysjzri wrote:
sunzy writes:
how to run a new application in a button's callback function??
system() ?
--tml
would you like to write it clearly?
e.g.
my button callback function:
void leftbutton_clicked(GtkWidget *widget, gpointer my_data)
{
}
and I want run "/usr/games/same-gnome" for example, how to do it?
This is done the same way as spawning any process from another program.
How you do it is highly dependent on the operating system. Fortunately
there are routines in glib that should help you:
http://developer.gnome.org/doc/API/2.0/glib/glib-Spawning-Processes.html
This is probably the most portable mechanism for running processes.
thank you
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]