GtkImageView and gtk+-3



Hi all,

Some ten years ago various people on this list helped me write Perl
bindings for GtkImageView.

https://github.com/GNOME/gtkimageview

https://metacpan.org/pod/Gtk2::ImageView

Now I am trying to migrate gscan2pdf to gtk+-3.0. Having enjoyed the
widget for the last ten years, I would like to continue to use it.
Unfortunately, there is no gtk3+-3 version and upstream is dead.

I attempted to compile GtkImageView against gtk+-3.0. This failed,
mostly due to types like GtkDrawable and GtkGC not being in gtk+-3,
which seems to have replaced such things with Cairo.

I see that the GTK people have their own version of GtkImageView in
gtk+-4.0:

https://git.gnome.org/browse/gtk+/commit/?h=wip/baedert/gtkimageview&id=545f4186042f03026410e174f9940696af76fccb

The code looks completely different to the gtk+-2 code. I haven't tested
it, but it doesn't seem to offer the ability to select regions of the
image, either.

Now I am trying to decide how to create the functionality of the widget
in gtk+-3. I see a couple of options:

1. Start with the gtk+-2 code and replace the deprecated types.

I'm no expert with Cairo, and I don't know whether that allows me to
throw away all the caching code that makes GtkImageView efficient.

2. Start with the gtk+-4.0 code and try to backport it to gtk+-3.0

I don't know how hard this is, and how difficult it is then to implement
stuff like region selection on top

3. Do something basic in Perl. Is region selection even possible in pure
Perl?

I know enough C to write Perl bindings and be generally dangerous, but I
am no expert, so I have started with #3, but I have no idea how to
implement the region selection functionality.

Any insights would be most welcome.

Regards

Jeff Ratcliffe

Attachment: signature.asc
Description: OpenPGP digital signature



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