LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   totem python plugin programming: is there any signal for video mouse click? (http://www.linuxquestions.org/questions/programming-9/totem-python-plugin-programming-is-there-any-signal-for-video-mouse-click-861626/)

nadavvin 02-09-2011 10:33 AM

totem python plugin programming: is there any signal for video mouse click?
 
Hello

I want that I click with the mouse on the video, it paused.

I notice that there is "BaconVideoWidget" which I guess is the video rendering widget but it don't have signal named "clicked":

Code:

vd = totem_object.get_video_widget()
vd.connect("clicked", vd.hide)
TypeError: <__main__.BaconVideoWidget object at 0x93db144 (BaconVideoWidget at 0x8857128)>: unknown signal name: clicked

Thanks
Nadav

Snark1994 02-09-2011 05:04 PM

I assume from your tags (and from what I know about totem) that you're using pyGTK... That might have been something that you want to mention in your post ;)

This isn't something that you will be able to do through the totem widget, AFAIK. You would set up an event handler on the window (http://www.pygtk.org/pygtk2tutorial/...tHandling.html) and then check if the click falls inside the totem widget. It's been a while since I had a look at pyGTK, you may even be able to check only for clicks that fall inside the widget itself :)

Hope this helps,

nadavvin 02-11-2011 03:01 PM

How do I catch the event of the click on the window?

I didn't found single of it in gtk.window and its parent widgets.

http://www.pygtk.org/docs/pygtk/class-gtkwindow.html

http://www.pygtk.org/docs/pygtk/clas...s-gtkcontainer

http://www.pygtk.org/docs/pygtk/clas...ypes-gtkwidget

found button-press-event although I didn't success to click on anything to trigger it

Snark1994 02-12-2011 11:09 AM

Did you read the link I posted?

If you did, you'll find reference to the EventBox (which you may not even need, depending on how the video widget is written), and sample code of how to connect an event-handling method to the 'button-press-event' that you mentioned.


All times are GMT -5. The time now is 11:37 AM.