Function rustwlc::callback::view_focus
[−]
[src]
pub fn view_focus(callback: extern "C" fn(_: WlcView, _: bool))
Callback invoked when a view is focused.
The view's ViewState::VIEW_ACTIVATED
bit should be set to true here.
Example
use rustwlc::WlcView; // The bitflags constants need to be imported manually. use rustwlc::VIEW_ACTIVATED; extern fn view_focus(view: WlcView, focused: bool) { println!("View {:?} is {} focus, updating...", view, if focused { "in" } else { "out of" }); view.set_state(VIEW_ACTIVATED, focused); }