[]Trait gtk::subclass::prelude::ObjectInterfaceExt

pub trait ObjectInterfaceExt: ObjectInterface {
    fn from_instance<T>(obj: &T) -> &Self
    where
        T: IsA<Object>
, { ... }
fn install_properties<'a, T>(&mut self, properties: &[T])
    where
        T: Borrow<Property<'a>>
, { ... }
fn add_signal(
        &mut self,
        name: &str,
        flags: SignalFlags,
        arg_types: &[Type],
        ret_type: Type
    ) { ... }
fn add_signal_with_class_handler<F>(
        &mut self,
        name: &str,
        flags: SignalFlags,
        arg_types: &[Type],
        ret_type: Type,
        class_handler: F
    )
    where
        F: Fn(&SignalClassHandlerToken, &[Value]) -> Option<Value> + Send + Sync + 'static
, { ... }
fn add_signal_with_accumulator<F>(
        &mut self,
        name: &str,
        flags: SignalFlags,
        arg_types: &[Type],
        ret_type: Type,
        accumulator: F
    )
    where
        F: Fn(&SignalInvocationHint, &mut Value, &Value) -> bool + Send + Sync + 'static
, { ... }
fn add_signal_with_class_handler_and_accumulator<F, G>(
        &mut self,
        name: &str,
        flags: SignalFlags,
        arg_types: &[Type],
        ret_type: Type,
        class_handler: F,
        accumulator: G
    )
    where
        F: Fn(&SignalClassHandlerToken, &[Value]) -> Option<Value> + Send + Sync + 'static,
        G: Fn(&SignalInvocationHint, &mut Value, &Value) -> bool + Send + Sync + 'static
, { ... } }

Provided methods

fn from_instance<T>(obj: &T) -> &Self where
    T: IsA<Object>, 

Get interface from an instance.

This will panic if obj does not implement the interface.

fn install_properties<'a, T>(&mut self, properties: &[T]) where
    T: Borrow<Property<'a>>, 

Install properties on the interface.

All implementors of the interface must provide these properties.

fn add_signal(
    &mut self,
    name: &str,
    flags: SignalFlags,
    arg_types: &[Type],
    ret_type: Type
)

Add a new signal to the interface.

This can be emitted later by glib::Object::emit and external code can connect to the signal to get notified about emissions.

fn add_signal_with_class_handler<F>(
    &mut self,
    name: &str,
    flags: SignalFlags,
    arg_types: &[Type],
    ret_type: Type,
    class_handler: F
) where
    F: Fn(&SignalClassHandlerToken, &[Value]) -> Option<Value> + Send + Sync + 'static, 

Add a new signal with class handler to the interface.

This can be emitted later by glib::Object::emit and external code can connect to the signal to get notified about emissions.

The class handler will be called during the signal emission at the corresponding stage.

fn add_signal_with_accumulator<F>(
    &mut self,
    name: &str,
    flags: SignalFlags,
    arg_types: &[Type],
    ret_type: Type,
    accumulator: F
) where
    F: Fn(&SignalInvocationHint, &mut Value, &Value) -> bool + Send + Sync + 'static, 

Add a new signal with accumulator to the interface.

This can be emitted later by glib::Object::emit and external code can connect to the signal to get notified about emissions.

The accumulator function is used for accumulating the return values of multiple signal handlers. The new value is passed as second argument and should be combined with the old value in the first argument. If no further signal handlers should be called, false should be returned.

fn add_signal_with_class_handler_and_accumulator<F, G>(
    &mut self,
    name: &str,
    flags: SignalFlags,
    arg_types: &[Type],
    ret_type: Type,
    class_handler: F,
    accumulator: G
) where
    F: Fn(&SignalClassHandlerToken, &[Value]) -> Option<Value> + Send + Sync + 'static,
    G: Fn(&SignalInvocationHint, &mut Value, &Value) -> bool + Send + Sync + 'static, 

Add a new signal with accumulator and class handler to the interface.

This can be emitted later by glib::Object::emit and external code can connect to the signal to get notified about emissions.

The accumulator function is used for accumulating the return values of multiple signal handlers. The new value is passed as second argument and should be combined with the old value in the first argument. If no further signal handlers should be called, false should be returned.

The class handler will be called during the signal emission at the corresponding stage.

Loading content...

Implementors

impl<T> ObjectInterfaceExt for T where
    T: ObjectInterface

Loading content...