Struct ImeCapabilities
pub struct ImeCapabilities(/* private fields */);Expand description
IME capabilities supported by client.
For example, if the client doesn’t support ImeCapabilities::cursor_area(), then not enabling
it will make IME hide the popup window instead of placing it arbitrary over the
client’s window surface.
When the capability is not enabled or not supported by the IME, trying to update its’
corresponding data with ImeRequest will be ignored.
New capabilities may be added to this struct in the future.
Implementations§
§impl ImeCapabilities
impl ImeCapabilities
pub fn new() -> ImeCapabilities
pub fn new() -> ImeCapabilities
Returns a new empty set of capabilities.
pub const fn with_hint_and_purpose(self) -> ImeCapabilities
pub const fn with_hint_and_purpose(self) -> ImeCapabilities
Marks hint and purpose as supported.
For more details see ImeRequestData::with_hint_and_purpose.
pub const fn without_hint_and_purpose(self) -> ImeCapabilities
pub const fn without_hint_and_purpose(self) -> ImeCapabilities
Marks hint and purpose as unsupported.
For more details see ImeRequestData::with_hint_and_purpose.
pub const fn hint_and_purpose(&self) -> bool
pub const fn hint_and_purpose(&self) -> bool
Returns true if hint and purpose is supported.
pub const fn with_cursor_area(self) -> ImeCapabilities
pub const fn with_cursor_area(self) -> ImeCapabilities
Marks cursor_area as supported.
For more details see ImeRequestData::with_cursor_area.
pub const fn without_cursor_area(self) -> ImeCapabilities
pub const fn without_cursor_area(self) -> ImeCapabilities
Marks cursor_area as unsupported.
For more details see ImeRequestData::with_cursor_area.
pub const fn cursor_area(&self) -> bool
pub const fn cursor_area(&self) -> bool
Returns true if cursor_area is supported.
pub const fn with_surrounding_text(self) -> ImeCapabilities
pub const fn with_surrounding_text(self) -> ImeCapabilities
Marks surrounding_text as supported.
For more details see ImeRequestData::with_surrounding_text.
pub const fn without_surrounding_text(self) -> ImeCapabilities
pub const fn without_surrounding_text(self) -> ImeCapabilities
Marks surrounding_text as unsupported.
For more details see ImeRequestData::with_surrounding_text.
pub const fn surrounding_text(&self) -> bool
pub const fn surrounding_text(&self) -> bool
Returns true if surrounding_text is supported.
Trait Implementations§
§impl Clone for ImeCapabilities
impl Clone for ImeCapabilities
§fn clone(&self) -> ImeCapabilities
fn clone(&self) -> ImeCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ImeCapabilities
impl Debug for ImeCapabilities
§impl Default for ImeCapabilities
impl Default for ImeCapabilities
§fn default() -> ImeCapabilities
fn default() -> ImeCapabilities
§impl Hash for ImeCapabilities
impl Hash for ImeCapabilities
§impl PartialEq for ImeCapabilities
impl PartialEq for ImeCapabilities
impl Copy for ImeCapabilities
impl Eq for ImeCapabilities
impl StructuralPartialEq for ImeCapabilities
Auto Trait Implementations§
impl Freeze for ImeCapabilities
impl RefUnwindSafe for ImeCapabilities
impl Send for ImeCapabilities
impl Sync for ImeCapabilities
impl Unpin for ImeCapabilities
impl UnwindSafe for ImeCapabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.