pub trait ContentProviderImpl: ContentProviderImplExt + ObjectImpl {
    // Provided methods
    fn content_changed(&self) { ... }
    fn attach_clipboard(&self, clipboard: &Clipboard) { ... }
    fn detach_clipboard(&self, clipboard: &Clipboard) { ... }
    fn formats(&self) -> ContentFormats { ... }
    fn storable_formats(&self) -> ContentFormats { ... }
    fn write_mime_type_future(
        &self,
        mime_type: &str,
        stream: &OutputStream,
        io_priority: Priority
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>> { ... }
    fn value(&self, type_: Type) -> Result<Value, Error> { ... }
}

Provided Methods§

source

fn content_changed(&self)

Emits the ::content-changed signal.

source

fn attach_clipboard(&self, clipboard: &Clipboard)

source

fn detach_clipboard(&self, clipboard: &Clipboard)

source

fn formats(&self) -> ContentFormats

Gets the formats that the provider can provide its current contents in.

§Returns

The formats of the provider

source

fn storable_formats(&self) -> ContentFormats

Gets the formats that the provider suggests other applications to store the data in.

An example of such an application would be a clipboard manager.

This can be assumed to be a subset of ContentProviderExt::formats().

§Returns

The storable formats of the provider

source

fn write_mime_type_future( &self, mime_type: &str, stream: &OutputStream, io_priority: Priority ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static>>

source

fn value(&self, type_: Type) -> Result<Value, Error>

Gets the contents of @self stored in @value.

The @value will have been initialized to the GType the value should be provided in. This given GType does not need to be listed in the formats returned by ContentProviderExt::formats(). However, if the given GType is not supported, this operation can fail and G_IO_ERROR_NOT_SUPPORTED will be reported.

§Returns

true if the value was set successfully. Otherwise @error will be set to describe the failure.

§value

the GValue to fill

Object Safety§

This trait is not object safe.

Implementors§