On Tue, Apr 03, 2001 at 11:31:44PM +0200, Valery Avaux wrote:
> Hello,
>
> I'm trying to build up a physics simulation with Glade and GTK. The main
> function of the simulation is a function called isingflip(). This
> function must do interations up to 100 times but the calculation is
> based
Salut !
> Hello,
>
> I'm trying to build up a physics simulation with Glade and GTK. The main
> function of the simulation is a function called isingflip(). This
> function must do interations up to 100 times but the calculation is
> based on two variables controlled by two scrollbars define
>Paul,
>My experience has been that it is a big mistake to distribute
>GTK calls (or any X based widget set for that matter) among threads.
>I use use multi-threading, however the gui controls live in a single
>thread.
Right, I concur, and I do exactly the same thing. However, it does
make li
Tried and work fine for me
Thanks a lot...
Valery Avaux
Joshua Horvath a écrit :
>
> Valery Avaux wrote:
> >
> > I don't really need to have totally threaded functions but I would
like
> > to be able to change the values of two parameters while the main
part of
> > the s
One key question is, does the parameter change need to cause a
calculation restart? I would presume so, unless the computation was
convergence-based. In that case, you'll presumably need to modify
isingflip() whatever approach you take.
if you previously had:
isingflip()
{
/* setup loop code
I don't really need to have totally threaded functions but I would like
to be able to change the values of two parameters while the main part of
the simulation runs. Here follows parts of the code I currently use:
int
main (int argc, char *argv[])
{
GtkWidget *temper;
GtkWidget *magnfield;
Paul,
My experience has been that it is a big mistake to distribute
GTK calls (or any X based widget set for that matter) among threads.
I use use multi-threading, however the gui controls live in a single
thread.
Hal
At 05:48 PM 4/3/01 -0400, Paul Davis wrote:
> >Is there a way to let me cha
If you don't need a full-fledged thread, you can just stick
while (gtk_events_pending())
gtk_main_iteration();
somewhere appropriate in your calculation function. This will allow GUI events
to be processed from within the calculation loop.
-Josh
Valery Avaux wrote:
>
> Hello,
>
> I'
>Is there a way to let me change parameters ? Maybe lookup signals or
>somenthing like that ? I've heard something about threads but I don't
>know what it is I'm really a newbie so if someone could give me some
>very detailled way to do this, it would be very nice.
nobody is going to give you
Hello,
I'm trying to build up a physics simulation with Glade and GTK. The main
function of the simulation is a function called isingflip(). This
function must do interations up to 100 times but the calculation is
based on two variables controlled by two scrollbars defined in the main
window.
10 matches
Mail list logo