gdk/
event_focus.rs

1// Copyright 2016, The Gtk-rs Project Developers.
2// See the COPYRIGHT file at the top-level directory of this distribution.
3// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
4
5use gdk_sys;
6use glib::translate::*;
7
8#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
9pub struct EventFocus(::Event);
10
11event_wrapper!(EventFocus, GdkEventFocus);
12event_subtype!(EventFocus, gdk_sys::GDK_FOCUS_CHANGE);
13
14impl EventFocus {
15    pub fn get_in(&self) -> bool {
16        from_glib(self.as_ref().in_ as _)
17    }
18}