pub fn create_context(&mut self, window: ffi::Window) -> Result<bool, ImeContextCreationError> {
        let context = if self.is_destroyed() {
            // Create empty entry in map, so that when IME is rebuilt, this window has a context.
            None
        } else {
            Some(unsafe { ImeContext::new(&self.inner.xconn, self.inner.im, window, None) }?)
        };
        self.inner.contexts.insert(window, context);
        Ok(!self.is_destroyed())
    }
// This pattern is used for various methods here:
// Ok(_) indicates that nothing went wrong internally
// Ok(true) indicates that the action was actually performed
// Ok(false) indicates that the action is not presently applicable
This pattern is used for various methods here:
Ok(_) indicates that nothing went wrong internally
Ok(true) indicates that the action was actually performed
Ok(false) indicates that the action is not presently applicable
This pattern is used for various methods here : Ok ( _ ) indicates that nothing went wrong internally Ok ( true ) indicates that the action was actually performed Ok ( false ) indicates that the action is not presently applicable
pub fn create_context(&mut self, window: ffi::Window) -> Result<bool, ImeContextCreationError> {
        let context = if self.is_destroyed() {
            // Create empty entry in map, so that when IME is rebuilt, this window has a context.
            None
        } else {
            Some(unsafe { ImeContext::new(&self.inner.xconn, self.inner.im, window, None) }?)
        };
        self.inner.contexts.insert(window, context);
        Ok(!self.is_destroyed())
    }
pub fn create_context ( & mut self , window : ffi :: Window ) -> Result < bool , ImeContextCreationError > { let context = if self . is_destroyed ( ) { // Create empty entry in map, so that when IME is rebuilt, this window has a context. None } else { Some ( unsafe { ImeContext :: new ( & self . inner . xconn , self . inner . im , window , None ) } ? ) } ; self . inner . contexts . insert ( window , context ) ; Ok ( ! self . is_destroyed ( ) ) }
This pattern is used for various methods here:
Ok(_) indicates that nothing went wrong internally
Ok(true) indicates that the action was actually performed
Ok(false) indicates that the action is not presently applicable
This pattern is used for various methods here : Ok ( _ ) indicates that nothing went wrong internally Ok ( true ) indicates that the action was actually performed Ok ( false ) indicates that the action is not presently applicable
&mut self
window
ffi::Window
&mut self
window
ffi::Window