[]Struct gtk::EventControllerKey

pub struct EventControllerKey(_, _);

EventControllerKey is an event controller meant for situations where you need access to key events.

This object was added in 3.24.

Feature: v3_24

Implements

EventControllerExt, glib::object::ObjectExt

Implementations

impl EventControllerKey[src]

pub fn new<P: IsA<Widget>>(widget: &P) -> EventControllerKey[src]

pub fn forward<P: IsA<Widget>>(&self, widget: &P) -> bool[src]

pub fn get_group(&self) -> u32[src]

pub fn get_im_context(&self) -> Option<IMContext>[src]

Gets the IM context of a key controller.

Feature: v3_24

Returns

the IM context

pub fn set_im_context<P: IsA<IMContext>>(&self, im_context: &P)[src]

pub fn connect_focus_in<F: Fn(&EventControllerKey) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_focus_out<F: Fn(&EventControllerKey) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_im_update<F: Fn(&EventControllerKey) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_key_pressed<F: Fn(&EventControllerKey, u32, u32, ModifierType) -> bool + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

This signal is emitted whenever a key is pressed.

Feature: v3_24

keyval

the pressed key.

keycode

the raw code of the pressed key.

state

the bitmask, representing the state of modifier keys and pointer buttons. See gdk::ModifierType.

Returns

true if the key press was handled, false otherwise.

pub fn connect_key_released<F: Fn(&EventControllerKey, u32, u32, ModifierType) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

This signal is emitted whenever a key is released.

Feature: v3_24

keyval

the released key.

keycode

the raw code of the released key.

state

the bitmask, representing the state of modifier keys and pointer buttons. See gdk::ModifierType.

pub fn connect_modifiers<F: Fn(&EventControllerKey, ModifierType) -> bool + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for EventControllerKey

impl Debug for EventControllerKey

impl Display for EventControllerKey[src]

impl Eq for EventControllerKey

impl Hash for EventControllerKey

impl IsA<EventController> for EventControllerKey

impl Ord for EventControllerKey

impl<T: ObjectType> PartialEq<T> for EventControllerKey

impl<T: ObjectType> PartialOrd<T> for EventControllerKey

impl StaticType for EventControllerKey

Auto Trait Implementations

impl RefUnwindSafe for EventControllerKey

impl !Send for EventControllerKey

impl !Sync for EventControllerKey

impl Unpin for EventControllerKey

impl UnwindSafe for EventControllerKey

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.