Trait SwitchExt

Source
pub trait SwitchExt: 'static {
    // Required methods
    fn get_active(&self) -> bool;
    fn get_state(&self) -> bool;
    fn set_active(&self, is_active: bool);
    fn set_state(&self, state: bool);
    fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
    fn emit_activate(&self);
    fn connect_state_set<F: Fn(&Self, bool) -> Inhibit + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn connect_property_active_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn connect_property_state_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
}

Required Methods§

Source

fn get_active(&self) -> bool

Source

fn get_state(&self) -> bool

Source

fn set_active(&self, is_active: bool)

Source

fn set_state(&self, state: bool)

Source

fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn emit_activate(&self)

Source

fn connect_state_set<F: Fn(&Self, bool) -> Inhibit + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_property_active_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_property_state_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<O: IsA<Switch>> SwitchExt for O