[−][src]Function gtk_test::mouse_release
pub fn mouse_release<W: IsA<Object> + IsA<Widget> + WidgetExt>(widget: &W)
Send a mouse release event to the given widget.
Warning!
Please note that the mouse-release event will "fail" if the window isn't on top of all other windows (this is a common issue on OSX). Don't forget to bring the button's window on top by using:
ⓘThis example is not tested
window.activate_focus();
Example:
extern crate gtk; #[macro_use] extern crate gtk_test; use gtk::{Entry, EntryExt}; gtk::init().expect("GTK init failed"); let entry = Entry::new(); entry.connect_icon_release(|_, _, _| { println!("released"); }); gtk_test::mouse_release(&entry);