[mythtv] Trouble adding mouse support in MythVideo VideoManager

Anthony D'Alberto afd1009 at hotmail.com
Thu Oct 4 12:27:53 UTC 2007

>> Anthony D'Alberto wrote:
>> Hello everyone, 
>> I am currently reworking the patches for mouse support in Myth. 

>> The way you are implementing mouse support is unlikely to be 
> applied to trunk. Apologies for being brutal, but here's the 
> reasoning: 
>> Current SVN actually has mouse support, provided by MythUI, 
> in the form of "gestures" - which can recognise button 
> presses as well. 

Thank you for letting me know about this.  I was unaware the gesture system was expected to go this way.  However, for those needing support sooner, I'll still try to get the patches finished for most windows.  I started this becuase I use Myth in my CARPC with a touchscreen, and wanted to get it working.  I thought the changes might be useful to more people.

>> Now, the problems. 
>> Currently, the only thing using MythUI is the menu. Most of 
> the other widgets provided by libmyth have not been migrated. 

>> Due to the way MythUI is implemented, mouse support comes 
> somewhat 'for free' when widgets and eventually screens are 
> migrated to using it. There is some work needed for some 
> screens as the implementation of gestureEvent in 
> MythThemedMenuPrivate shows. 

I tried to get mouse support in the lowest level possible, in MythThemedDialog.  The widgets' mouse code I added is handled as low as possible.  In this way, things like playbackbox and such don't even have a mouse event function.  The base class function works, and sends the mouse notification to the widgets directly.  For things like button presses, I call the push() function from the mouse handler, and that's it.  So the added code there is quite minimal.  Of course each plugin is different, and not always handled the same way.

I really wanted to get the mouseEvent in MythDialog, but there does not seem to be a single container for all widgets on a form in MythDialog (I could be wrong about that).  I'll take a look at MythUI to see if I could contribute to the gestures way of things at all.

>> There was an attempt during the google Summer of Code to do 
> part of the MythUI migration. This project did produce some 
> code, however, the results were not considered "close 
> enough" to where Isaac was wanting to go with it to use. 

Thanks again for the information.  As I said, I'll continue to finish the patches for anyone who would like them.  If they don't get applied to the trunk, it is totally understandable.  


Peek-a-boo FREE Tricks & Treats for You!

More information about the mythtv-dev mailing list