Hi Dhananjay, Text rendering on examples/apps will need "fonts" to be installed properly on your system. This is one thing you can check if your gtk+ example still not drawing text on buttons, etc.
-Arun On Tue, Jan 6, 2009 at 10:48 PM, Dhananjoy Chutia <dha...@gmail.com> wrote: > > Hi, > > Thanks a lot for your valuable suggestion. I followed your instructions > and added the suggested lines. I had done minor modification to overcome > failure for multiple definition & warning due to one assertion failure. > > I tried gtk-demo, but only background was drawn, no widget were visible. > After that, I compiled the gtk+ example, helloworld & executed. I observed > that background is drawn. But, no text is displayed for the button label. I > also tried to change button/label color by changing the gtkrc, that had also > no effect. > > Now, can anyone suggest me a wawy to overcome this situation? > > My packages are > > glib-2.18.3 configured with --build=i386-linux --disable-gtk-doc > --disable-man --enable-debug > cairo-1.8.6 configured with --enable-directfb --disable-xlib > --disable-win32 > pixman-0.13.2 > pango-1.22.3 configured with --without-x > > Here is the change: > > > diff -pur directfb_patched/gdkwindow-directfb.c > directfb_patched_m/gdkwindow-directfb.c > --- directfb_patched/gdkwindow-directfb.c 2009-01-06 21:26:17.000000000 > +0530 > +++ directfb_patched_m/gdkwindow-directfb.c 2009-01-06 > 22:13:35.000000000 +0530 > @@ -67,6 +67,7 @@ static void gdk_window_impl_direc > static void gdk_window_impl_directfb_init > (GdkWindowImplDirectFB *window); > static void gdk_window_impl_directfb_class_init > (GdkWindowImplDirectFBClass *klass); > static void gdk_window_impl_directfb_finalize > (GObject *object); > +static void gdk_window_impl_iface_init (GdkWindowImplIface *iface); > > > void gdk_window_directfb_hide (GdkWindow *window); > @@ -95,6 +96,12 @@ typedef struct > static GSList *update_windows = NULL; > static guint update_idle = 0; > > +G_DEFINE_TYPE_WITH_CODE (GdkWindowImplDirectFB, > + gdk_window_impl_directfb, > + GDK_TYPE_DRAWABLE_IMPL_DIRECTFB, > + G_IMPLEMENT_INTERFACE (GDK_TYPE_WINDOW_IMPL, > + > gdk_window_impl_iface_init)); > + > static void > gdk_window_directfb_process_all_updates (void) > { > @@ -114,6 +121,7 @@ gdk_window_directfb_process_all_updates > while (tmp_list) > { > GdkWindowObject *private = GDK_WINDOW_OBJECT( tmp_list->data > ); > + GdkWindowImplDirectFB *wimpl = GDK_WINDOW_IMPL_DIRECTFB( > private->impl ); > > if (private->update_freeze_count) > { > @@ -206,7 +214,7 @@ gdk_window_impl_directfb_paintable_init > > > > - > +#if 0 > GType > gdk_window_impl_directfb_get_type (void) > { > @@ -245,6 +253,7 @@ gdk_window_impl_directfb_get_type (void) > > return object_type; > } > +#endif > > GType > _gdk_window_impl_get_type (void) > @@ -420,6 +429,10 @@ _gdk_windowing_window_init (void) > > _gdk_parent_root = g_object_new (GDK_TYPE_WINDOW, NULL); > private = GDK_WINDOW_OBJECT (_gdk_parent_root); > + > + private->impl = g_object_new (_gdk_window_impl_get_type (), NULL); > + printf("DFB:%s:allocating window impl\n",__FUNCTION__); > + > impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl); > > private->window_type = GDK_WINDOW_ROOT; > @@ -442,7 +455,7 @@ _gdk_windowing_window_init (void) > desc.flags = DWDESC_CAPS; > desc.caps = 0; > desc.caps |= DWCAPS_NODECORATION; > - desc.caps |= DWCAPS_ALPHACHANNEL; > +// desc.caps |= DWCAPS_ALPHACHANNEL; > desc.flags |= ( DWDESC_WIDTH | DWDESC_HEIGHT | > DWDESC_POSX | DWDESC_POSY ); > desc.posx = 0; > @@ -455,6 +468,7 @@ _gdk_windowing_window_init (void) > } > > impl->drawable.surface->GetPixelFormat(impl->drawable.surface,&impl->drawable.format); > > private->depth = DFB_BITS_PER_PIXEL(impl->drawable.format); > + printf("DFB:depth=%d\n",private->depth); > /* > Now we can set up the system colormap > */ > @@ -489,6 +503,8 @@ gdk_directfb_window_new (GdkWindow > > window = g_object_new (GDK_TYPE_WINDOW, NULL); > private = GDK_WINDOW_OBJECT (window); > + private->impl = g_object_new (_gdk_window_impl_get_type (), NULL); > + printf("DFB:%s:allocating window impl\n",__FUNCTION__); > > parent_private = GDK_WINDOW_OBJECT (parent); > parent_impl = GDK_WINDOW_IMPL_DIRECTFB (parent_private->impl); > @@ -2730,6 +2746,10 @@ GdkWindow *gdk_directfb_create_child_win > > window = g_object_new (GDK_TYPE_WINDOW, NULL); > private = GDK_WINDOW_OBJECT (window); > + > + private->impl = g_object_new (_gdk_window_impl_get_type (), NULL); > + printf("DFB:%s:allocating window impl\n",__FUNCTION__); > + > parent_private = GDK_WINDOW_OBJECT (parent); > parent_impl = GDK_WINDOW_IMPL_DIRECTFB (parent_private->impl); > private->parent = parent_private; > @@ -2809,6 +2829,10 @@ gdk_window_foreign_new_for_display (GdkD > /* we hold a reference count on ourselves */ > g_object_ref (window); > private = GDK_WINDOW_OBJECT (window); > + > + private->impl = g_object_new (_gdk_window_impl_get_type (), NULL); > + printf("DFB:%s:allocating window impl\n",__FUNCTION__); > + > private->parent = parent_private; > private->window_type = GDK_WINDOW_TOPLEVEL; > impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl); > > > > > > Regards > > Dhananjoy > > > > > > > > > On Tue, Jan 6, 2009 at 11:08 AM, Minsu Han <minsu81....@samsung.com>wrote: > >> >> Hi. >> >> I also had a same problem. But now I know why this problem is happened. >> >> I think the problem is there's no impl(GdkWindowImplDirectFB) object in >> _gdk_windowing_window_init(). >> >> So when you refer impl pointer, there's some segmentation fault. >> >> >> >> In _gdk_windowing_window_init(). >> >> { >> >> ... >> >> _gdk_parent_root = g_object_new (GDK_TYPE_WINDOW, NULL); >> >> private = GDK_WINDOW_OBJECT (_gdk_parent_root); >> >> impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl); >> >> impl->gdkWindow = _gdk_parent_root; >> >> ... >> >> } >> >> >> >> In my case, I declare GdkWindowImplDirectFB info using >> G_DEFINE_TYPE_WITH_CODE. >> >> And initialize impl data. >> >> impl = g_object_new(_gdk_window_impl_get_type(), NULL ); >> >> >> >> Maybe it should be added in _gdk_windowing_window_init(), >> gdk_directfb_window_new(), gdk_directfb_create_child_window(), >> gdk_window_foreign_new_for_display(). >> >> After that, gtk-demo will be worked correctly. >> >> >> >> BR >> >> minsu.han >> >> >> > > > _______________________________________________ > directfb-dev mailing list > directfb-dev@directfb.org > http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev > >
_______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev