[mythtv] Touchscreen support
mythtv at lamedomainname.com
Mon Aug 25 07:34:07 EDT 2003
On Sunday 24 August 2003 10:15 pm, dyno wrote:
> My Progamming experience is very limited, although I do plan trying to make
> one or two modules if I can figure out how, and if an offical patch isn't
> released to support mouse input, then maybe I'll look into that too.
The "right way" to do touchscreen support in Myth would be to alter the low
level dialog classes. There's a class called MythThemedDialog in
mythtv/libs/libmyth/mythdialogs.h/cpp that is the base class for (a growing
number of) the dialogs that a user sees.
A MythThemedDialog uses theme.xml files to create myth widgets (push buttons,
selectors, lists, etc.) and draw them. It then parses keyboard input and
takes action. To make touchscreens work, you would need to:
* add a MousePressEvent handler to MythThemedDialog.
* have the base class do some calculations to figure out where the mouse
press (ie. touchscreen push) occured and use that to resolve which myth
widget occupies the coordinates (taking into account size, draworder, and
* by default, call ->activate() on the resolved widget, but let the event
handling method be re-implemented in derived classes to handle special cases.
This is not particularily difficult to do, it's just that no one has gotten
around to it.
More information about the mythtv-dev