Re: How to write a procedure that can be stopped



Hi Zbigniew

I think you need something like the following code snippet.

gboolean kill_funtion = FALSE;

...
void foo()
{
	while (!kill_funtion) {
		...
		// Process all pending events in gtk_main()
		while (g_main_iteration(FALSE));
	}
	kill_funtion = FALSE;
}

void button_event(...)
{
	kill_function = TRUE;
}

Bye

Jan-Marek





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