pub struct WlCallback { /* private fields */ }Expand description
A wl_callback object.
See the documentation of the module for the interface description.
Implementations§
Source§impl WlCallback
impl WlCallback
Sourcepub fn set_handler(&self, handler: impl WlCallbackHandler)
pub fn set_handler(&self, handler: impl WlCallbackHandler)
Sets a new handler.
Sourcepub fn set_boxed_handler(&self, handler: Box<dyn WlCallbackHandler>)
pub fn set_boxed_handler(&self, handler: Box<dyn WlCallbackHandler>)
Sets a new, already boxed handler.
Source§impl WlCallback
impl WlCallback
Sourcepub const MSG__DONE__SINCE: u32 = 1u32
pub const MSG__DONE__SINCE: u32 = 1u32
Since when the done message is available.
Sourcepub fn try_send_done(&self, callback_data: u32) -> Result<(), ObjectError>
pub fn try_send_done(&self, callback_data: u32) -> Result<(), ObjectError>
done event
Notify the client when the related request is done.
§Arguments
callback_data: request-specific data for the callback
Trait Implementations§
Source§impl ConcreteObject for WlCallback
impl ConcreteObject for WlCallback
Source§const XML_VERSION: u32 = 1u32
const XML_VERSION: u32 = 1u32
The interface version from the XML file that the interface was generated from.
Source§const INTERFACE: ObjectInterface = ObjectInterface::WlCallback
const INTERFACE: ObjectInterface = ObjectInterface::WlCallback
The interface of the object.
Source§const INTERFACE_NAME: &str = "wl_callback"
const INTERFACE_NAME: &str = "wl_callback"
The interface of the object as a string.
Source§impl Debug for WlCallback
impl Debug for WlCallback
Source§impl Object for WlCallback
impl Object for WlCallback
Source§fn core(&self) -> &ObjectCore
fn core(&self) -> &ObjectCore
Returns the
ObjectCore of this object.Source§fn unset_handler(&self)
fn unset_handler(&self)
Unsets the handler of this object. Read more
Source§fn get_handler_any_ref(
&self,
) -> Result<HandlerRef<'_, dyn Any>, HandlerAccessError>
fn get_handler_any_ref( &self, ) -> Result<HandlerRef<'_, dyn Any>, HandlerAccessError>
Returns a shared reference to the handler.
Source§fn get_handler_any_mut(
&self,
) -> Result<HandlerMut<'_, dyn Any>, HandlerAccessError>
fn get_handler_any_mut( &self, ) -> Result<HandlerMut<'_, dyn Any>, HandlerAccessError>
Returns a mutable reference to the handler.
Auto Trait Implementations§
impl !Freeze for WlCallback
impl !RefUnwindSafe for WlCallback
impl !Send for WlCallback
impl !Sync for WlCallback
impl Unpin for WlCallback
impl !UnwindSafe for WlCallback
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ObjectCoreApi for T
impl<T> ObjectCoreApi for T
Source§fn client(&self) -> Option<Rc<Client>>
fn client(&self) -> Option<Rc<Client>>
Returns the
Client associated with this object, if any.Source§fn interface(&self) -> ObjectInterface
fn interface(&self) -> ObjectInterface
Returns the
ObjectInterface of this object.Source§fn try_delete_id(&self) -> Result<(), ObjectError>
fn try_delete_id(&self) -> Result<(), ObjectError>
Tries to send a wl_display.delete_id event for this object. Read more
Source§fn set_forward_to_client(&self, enabled: bool)
fn set_forward_to_client(&self, enabled: bool)
Enables or disables automatic forwarding of events to the client. Read more
Source§fn set_forward_to_server(&self, enabled: bool)
fn set_forward_to_server(&self, enabled: bool)
Enables or disables automatic forwarding of requests to the server. Read more
Source§impl<T> ObjectUtils for T
impl<T> ObjectUtils for T
Source§fn try_get_handler_ref<T>(
&self,
) -> Result<HandlerRef<'_, T>, HandlerAccessError>where
T: 'static,
fn try_get_handler_ref<T>(
&self,
) -> Result<HandlerRef<'_, T>, HandlerAccessError>where
T: 'static,
Tries to get a shared reference to the handler.
Source§fn get_handler_ref<T>(&self) -> HandlerRef<'_, T>where
T: 'static,
fn get_handler_ref<T>(&self) -> HandlerRef<'_, T>where
T: 'static,
Gets a shared reference to the handler. Read more
Source§fn try_get_handler_mut<T>(
&self,
) -> Result<HandlerMut<'_, T>, HandlerAccessError>where
T: 'static,
fn try_get_handler_mut<T>(
&self,
) -> Result<HandlerMut<'_, T>, HandlerAccessError>where
T: 'static,
Tries to get a mutable reference to the handler.
Source§fn get_handler_mut<T>(&self) -> HandlerMut<'_, T>where
T: 'static,
fn get_handler_mut<T>(&self) -> HandlerMut<'_, T>where
T: 'static,
Gets a mutable reference to the handler. Read more