Re: Touch support in Abiword

From: Carlos Garnacho <carlos_at_lanedo.com>
Date: Tue Jul 24 2012 - 13:37:16 CEST

Hey,

On mar, 2012-07-24 at 10:32 +0200, Jean Brefort wrote:
> Le mardi 17 juillet 2012 à 14:25 +0200, Carlos Garnacho a écrit :
> > Hello :),
> >
> > On lun, 2012-07-16 at 12:54 -0300, Gonzalo Odiard wrote:
> > > Hi,
> > > In the Sugar environment, we are doing work to support touch in our
> > > user interfaces.
> > > Thanks to Abiword port to gtk3, should be possible use touch to do
> > > text selection in our Write activity too.
> > > The proposed behaviour was detailed by Gary Martin here
> > > http://wiki.sugarlabs.org/go/Design_Team/Sugar_Shell_Touch_Input#Text_editing
> > > and is being implemented by Carlos Garnacho in gtk
> > > http://git.gnome.org/browse/gtk+/log/?h=touch-text-selection
> > > I have read, Abiword was used in other mobile envs in the past,
> > > maybe there are code useful already present in the code,
> > > and I don't know how much code from gtk can be used in the Abiword canvas.
> > > How do you think should be the best way to implement touch text
> > > selection in Abiword?
> >
> > From what I gathered, there are two things that might need to be
> > reimplemented on Abiword so it's on par with GTK+ widgets wrt touch
> > friendliness,
> >
> > * touch/kinetic scrolling: This is implemented in GtkScrolledWindow
> > through 3.0's GtkWidget::captured-event, as Abiword doesn't use this
> > widget for scrolling support, this piece of code has to be reimplemented
>
> This is probably easy. Just needs a volunteer owning appropriate
> hardware.

I'm meaning to do the work, after I get gobject-introspection properly
working and tested :)

>
> > * text selection, in that branch, there's a private GtkTextHandle helper
> > object that text widgets use to manipulate the selection, if it remains
> > private API, Abiword could need its own copy of it.
>
> I seriously doubt this can be of any help for Abiword. The models are
> too much different.

The helper object I'm referring to [1] doesn't interact at all with the
text model itself, it's in fact used by GtkEntry and GtkTextView in that
branch, which don't share a lot internally :). The object just takes
care of the handle(s) being displayed and signals the text widget about
those being dragged, the text widget is in turn responsible of
relocating them wherever it makes sense anytime.

Cheers,
  Carlos

[1] http://git.gnome.org/browse/gtk+/tree/gtk/gtktexthandleprivate.h?h=touch-text-selection
Received on Tue Jul 24 13:37:33 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 24 2012 - 13:37:33 CEST