[sane-devel] Release 1.0.33?
Ralph Little
skelband at gmail.com
Sun Aug 29 19:37:57 BST 2021
Hi,
On 2021-08-29 11:26 a.m., Thierry Huchard wrote:
>> As an aside, I would also like to propose that we schedule a release of
>> the SANE frontends perhaps a short while after the backends' release.
>>
>> We have had a request to port our x* frontends to GTK3 (or 4?) and I am
>> currently working my way through that.
>> GTK4 has been released and GTK2 (GTK+) has been well and truly
>> deprecated to the point at which I fear that some distros might drop
>> support entirely.
>>
>> GTK porting is not something I have done before but it is an exercise
>> that is required for xsane also so the effort is worthwhile.
>>
>> The biggest deal seems to be the use of GtkPreview to render and manage
>> the preview window, which has been removed entirely from GTK3.
>> There will be a few other bits and pieces here and there I am sure.
> Hi Ralph,
>
> For the Gtk migration, I can help!
>
> Thierry
That would be really appreciated, thanks!
I would like to have a stab at the port unaided at least for the first
pass because it is a good learning exercise for myself.
I mostly learn by doing but if you could take a look through my
first-pass port, when I check it in, to see if there is anything that I
have done badly or if there is a better way then that would be excellent!
For the first pass, I am staying with GTK2 and removing deprecated
features. That is mostly involved in reimplementing the GtkPreview
functionality that is used in the Preview window of xscanimage. I am
replacing it with a GtkDrawingArea and backing it with a data buffer
using cairo_image_surface_create_for_data(), which is similar to what
xscanimage is going at present so the changes are fairly minimal. The
data buffer format will be slightly different but I don't think that
should be an issue. xscanimage gradually adds data to the buffer as it
comes in so the preview emerges as the image data is received.
I also have some ideas for implementing the selection area. At the
moment it is a thin rectangle that is drawn across the preview image
with the mouse. I'm thinking that a translucent mask with the selected
area transparent might look very effective and modern and simple to do.
I'll let you know when I have something worth looking at! Any porting
comments that you have are also appreciated.
Cheers,
Ralph
More information about the sane-devel
mailing list