Hi All,
I have added few lines in scribble-simple.c (gtk+-2.10.1/examples/scribble-simple) for the foreground color. Kindly find the attached patch file for this. I'm not able to set the foreground color for gtk_drawable application(scribble-simple) over DirectFB (but over X it is working fine).In the function expose_event whatever color I am setting for brush, DirectFB is taking Black color only irrespective of any new foreground color set using gdk_gc_set_foreground(). --- /opt/gtk_dfb/gtk+-2.10.1/examples/scribble-simple/scribble-simple.c 2005-01-04 00:56:34.000000000 +0530 +++ scribble-simple.c 2006-11-13 14:27:07.509601600 +0530 @@ -49,6 +49,10 @@ static gboolean configure_event( GtkWidg static gboolean expose_event( GtkWidget *widget, GdkEventExpose *event ) { + GdkColor color; + + color.pixel = 0xffff0000; + gdk_gc_set_foreground (widget->style->fg_gc[GTK_WIDGET_STATE (widget)], &color); gdk_draw_drawable (widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], pixmap, Regards, Prasanna
--- /opt/gtk_dfb/gtk+-2.10.1/examples/scribble-simple/scribble-simple.c 2005-01-04 00:56:34.000000000 +0530 +++ scribble-simple.c 2006-11-13 14:27:07.509601600 +0530 @@ -49,6 +49,10 @@ static gboolean configure_event( GtkWidg static gboolean expose_event( GtkWidget *widget, GdkEventExpose *event ) { + GdkColor color; + + color.pixel = 0xffff0000; + gdk_gc_set_foreground (widget->style->fg_gc[GTK_WIDGET_STATE (widget)], &color); gdk_draw_drawable (widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], pixmap,
_______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list