GTK+ 4: knowing the action/event at the origin of a text insertion/deletion?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GTK+ 4: knowing the action/event at the origin of a text insertion/deletion?

Sébastien Wilmet-2
Hi,

With the plans for GTK+ 4, I wonder if it'll solve the following
use-case.

Knowing where does a text insertion/deletion come from. In GtkTextView
and GtkEntry. Is it a key press? Is it a cut/paste/…? Is it done
programmatically? Etc.

Because currently with GTK+ 3 there are heuristics in GtkSourceView (for
the undo/redo) and gspell (to not underline the word currently typed) to
know whether a text insertion/deletion is a simple key press. If the
inserted/deleted text is only one character at the cursor position, it
assumes that it was a key press.

For example in GtkSourceView for the undo/redo:
https://git.gnome.org/browse/gtksourceview/tree/gtksourceview/gtksourceundomanagerdefault.c?h=3.24.3#n42

But heuristics are not ideal of course. Will the input handling rework
in GTK+ 4 support that use-case?

Thanks,
Sébastien
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTK+ 4: knowing the action/event at the origin of a text insertion/deletion?

Timm Bäder
On 07.07, Sébastien Wilmet wrote:
> But heuristics are not ideal of course. Will the input handling rework
> in GTK+ 4 support that use-case?

As far as I know, the input rework so far only touches pointer input and
has nothing to do with keyboard input at all. I'm not sure what Carlos
and/or Christian have planned and what they will actually implement
though.
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTK+ 4: knowing the action/event at the origin of a text insertion/deletion?

Sébastien Wilmet-2
On Sat, Jul 08, 2017 at 10:08:56AM +0200, Timm Bäder wrote:
> On 07.07, Sébastien Wilmet wrote:
> > But heuristics are not ideal of course. Will the input handling rework
> > in GTK+ 4 support that use-case?
>
> As far as I know, the input rework so far only touches pointer input and
> has nothing to do with keyboard input at all. I'm not sure what Carlos
> and/or Christian have planned and what they will actually implement
> though.

OK, thanks for your reply.

--
Sébastien
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Loading...