owlkettle icon indicating copy to clipboard operation
owlkettle copied to clipboard

Add the ability to dispatch events programmatically to any child within a Widget

Open PhilippMDoerner opened this issue 2 years ago • 0 comments

This occurred to me today, that I would like to eventually be able to test my owlkettle application (once I write one). For the most part that just means check programmatically that a given widgetstate has the anticipated values etc.

For that to even be remotely useful though it is absolutely necessary to be able to trigger click and keyboard events from the outside (and ideally more, basically any kind of event I'd want to be able to trigger artificially).

But that is just one piece of the puzzle, as generally you can dispatch events fairly easily with a GtkWidget, a signal-name and g_signal_emit_by_name.

The Problem is imo more that from the outside (so outside of the view method) from a test you can't really access the gui-tree inside the widget to e.g. dispatch a click event to a button that is within the box-widget at the root of the gui-tree, can you?

PhilippMDoerner avatar Nov 19 '23 22:11 PhilippMDoerner