gtk+ with directfb backend



Hi, I try to port gtk+ with directfb backend on SH4 processor.
After I compile all packages completely, I use the following codes to test.
 
#include <gtk/gtk.h>
 
int main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *button;
   
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
button = gtk_button_new_with_label ("Hello World");
gtk_container_add (GTK_CONTAINER (window),button);
#gtk_widget_show (button);                               <== I comment this line
gtk_widget_show  (window);
   
gtk_main ();
return 0;
}
 
I can see a window with blue background if I comment gtk_widget_show(button).
But if I uncomment gtk_widget_show(button), I can't see both the button and window on screen.
Besides the button, I can't show any widgets on the window.
Could it be something wrong in my building process?
Or anyone give me any suggestion about this?
 
Whether the above situation happens or not, the following message appears every time.
Does it relate to my problem?
 
(helloworld:927): Gdk-CRITICAL **: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
 
The following are these packages I use
 zlib-1.2.3
 libpng-1.2.18
 freetype-2.3.4
 jpeg-6b
 DirectFB-1.0.0-rc1
 atk-1.9.1
 expat-2.0.1
 fontconfig-2.4.2
 cairo-1.4.6
 pango-1.16.4
 gtk+-2.10.13
 
Thank in advance.


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