Tuesday, October 22, 2019

gtk-java issues with old

There have been quite a few changes in Gtk3. 

There is no member window exposed as part of GtkWidget anymore,

 the members have been moved to GtkWidgetPrivate which is an opaque structure so you cannot access the members directly from GtkWidget

You will have to use accessor function, in this case where you need window member of GtkWidget 

you can use gtk_widget_get_window, but that may not fix 

 Please note that the expose_event signal has been replaced with draw signal 

so you will need to update the function which is actually drawing appropriately 

 Please refer this link to see the list of changes needed to switch to Gtk3. You can refer source provided by gtk-demo application or demos/gtk-demo from Gtk3 source code to get sample code.
Regarding image not being shown in case of Gtk2, if you are working with image sample, please make sure that the image file is available in the path mentioned in the source.

No comments:

Post a Comment