Re: gui interface with gtk
- From: Gustavo Noronha Silva <kov debian org>
- To: gtk-app-devel-list gnome org
- Subject: Re: gui interface with gtk
- Date: Mon, 18 Feb 2002 14:10:55 -0300
On Mon, 18 Feb 2002 17:18:13 +0100
"Luis Mejias" <lmejias disam etsii upm es> wrote:
FG, so a while loop call this method, to display images continously. The
problem is when i lanch the program i can't see the buttons, bars, etc from
try using gtk_timeout_add instead of a while loop, the while loop is probably
avoiding the gtk_main loop to happen... something like:
int dto;
[...]
void testrgb_rgb_test (GtkWidget *drawing_area){
printf("pImColor=%d\n",pImColor);
printf("bufIm=%d\n",bufIm);
/* calls testrgb_rgb_cb every 100 miliseconds) */
dto = gtk_timeout_add (100, testrgb_rgb_cb (drawing_area);
}
int testrgb_rgb_cb (gpointer data)
{
GtkWidget *drawing_area = (GtkWidget*) data;
SiguienteFrame(); /*read images from the FG*/
gdk_draw_gray_image (drawing_area->window,
drawing_area->style->white_gc,
0, 0, WIDTH+10, HEIGHT+10, GDK_RGB_DITHER_NONE,
bufIm, WIDTH);
return TRUE; /* tells gtk_timeout that he should continue calling me */
}
--
Gustavo Noronha Silva - kov <http://www.metainfo.org/kov>
*---------* -+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-+
| .''`. | Debian GNU/Linux: <http://www.debian.org> |
| : :' : + Debian BR.......: <http://debian-br.cipsga.org.br>+
| `. `'` + Q: "Why did the chicken cross the road?" +
| `- | A: "Upstream's decision." -- hmh |
*---------* -+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]