Struct xpcom::interfaces::nsITextInputProcessorNotification
[−]
[src]
#[repr(C)]pub struct nsITextInputProcessorNotification { /* fields omitted */ }
interface nsITextInputProcessorNotification : nsISupports
/**
* nsITextInputProcessorNotification stores the type of notification to IME and
* its detail. See each explanation of attribute for the detail.
*/
Methods
impl nsITextInputProcessorNotification
[src]
pub fn coerce<T: nsITextInputProcessorNotificationCoerce>(&self) -> &T
[src]
Cast this nsITextInputProcessorNotification
to one of its base interfaces.
impl nsITextInputProcessorNotification
[src]
pub unsafe fn GetType(&self, aType: &mut nsACString) -> nsresult
[src]
/**
* type attribute represents what's notified or requested. Value must be
* one of following values:
*
* "request-to-commit" (required to be handled)
* This is requested when Gecko believes that active composition should be
* committed. nsITextInputProcessorCallback::onNotify() has to handle this
* notification.
*
* "request-to-cancel" (required to be handled)
* This is requested when Gecko believes that active composition should be
* canceled. I.e., composition should be committed with empty string.
* nsITextInputProcessorCallback::onNotify() has to handle this
* notification.
*
* "notify-end-input-transaction" (optional)
* This is notified when the callback is detached from
* nsITextInputProcessor. I.e., the TextInputProcessor lost the rights
* to input text and needs to call .beginInputTransaction() before next
* input.
*
* "notify-focus" (optional)
* This is notified when an editable editor gets focus and Gecko starts
* to observe changes in the content. E.g., selection changes.
* IME shouldn't change DOM tree, focus nor something when this is notified.
*
* "notify-blur" (optional)
* This is notified when an editable editor loses focus and Gecko stops
* observing the changes in the content.
*
* "notify-text-change" (optional)
* This is notified when text in the focused editor is modified.
* Some attributes below are available to retrieve the detail.
* IME shouldn't change DOM tree, focus nor something when this is notified.
* Note that when there is no chance to notify you of some text changes
* safely, this represents all changes as a change.
*
* "notify-selection-change" (optional)
* This is notified when selection in the focused editor is changed.
* Some attributes below are available to retrieve the detail.
* IME shouldn't change DOM tree, focus nor something when this is notified.
* Note that when there was no chance to notify you of this safely, this
* represents the latest selection change.
*
* "notify-position-change" (optional)
* This is notified when layout is changed in the editor or the window
* is moved.
* IME shouldn't change DOM tree, focus nor something when this is notified.
* Note that when there was no chance to notify you of this safely, this
* represents the latest layout change.
*/
readonly attribute ACString type;
pub unsafe fn GetOffset(&self, aOffset: *mut uint32_t) -> nsresult
[src]
/**
* Be careful, line breakers in the editor are treated as native line
* breakers. I.e., on Windows, a line breaker is "\r\n" (CRLF). On the
* others, it is "\n" (LF). If you want TextInputProcessor to treat line
* breakers on Windows as XP line breakers (LF), please file a bug with
* the reason why you need the behavior.
*/
/**
* This attribute has a valid value when type is "notify-text-change" or
* "notify-selection-change".
* This is offset of the start of modified text range if type is
* "notify-text-change". Or offset of start of selection if type is
* "notify-selection-change".
*/
readonly attribute unsigned long offset;
pub unsafe fn GetText(&self, aText: &mut nsAString) -> nsresult
[src]
/**
* This attribute has a valid value when type is "notify-selection-change".
* This is selected text. I.e., the length is selected length and
* it's empty if the selection is collapsed.
*/
readonly attribute AString text;
pub unsafe fn GetCollapsed(&self, aCollapsed: *mut bool) -> nsresult
[src]
/**
* This attribute has a valid value when type is "notify-selection-change".
* This is set to true when the selection is collapsed. Otherwise, false.
*/
readonly attribute boolean collapsed;
pub unsafe fn GetLength(&self, aLength: *mut uint32_t) -> nsresult
[src]
/**
* This attribute has a valid value when type is "notify-selection-change".
* This is selected length. I.e., if this is 0, collapsed is set to true.
*/
readonly attribute uint32_t length;
pub unsafe fn GetReversed(&self, aReversed: *mut bool) -> nsresult
[src]
/**
* This attribute has a valid value when type is "notify-selection-change".
* When selection is created from latter point to former point, this is
* set to true. Otherwise, false.
* I.e., if this is true, offset + length is the anchor of selection.
*/
readonly attribute boolean reversed;
pub unsafe fn GetWritingMode(&self, aWritingMode: &mut nsACString) -> nsresult
[src]
/**
* This attribute has a valid value when type is "notify-selection-change".
* This indicates the start of the selection's writing mode.
* The value can be "horizontal-tb", "vertical-rl" or "vertical-lr".
*/
readonly attribute ACString writingMode;
pub unsafe fn GetCausedByComposition(
&self,
aCausedByComposition: *mut bool
) -> nsresult
[src]
&self,
aCausedByComposition: *mut bool
) -> nsresult
/**
* This attribute has a valid value when type is "notify-selection-change".
* If the selection change was caused by composition, this is set to true.
* Otherwise, false.
*/
readonly attribute boolean causedByComposition;
pub unsafe fn GetCausedBySelectionEvent(
&self,
aCausedBySelectionEvent: *mut bool
) -> nsresult
[src]
&self,
aCausedBySelectionEvent: *mut bool
) -> nsresult
/**
* This attribute has a valid value when type is "notify-selection-change".
* If the selection change was caused by selection event, this is set to true.
* Otherwise, false.
*/
readonly attribute boolean causedBySelectionEvent;
pub unsafe fn GetOccurredDuringComposition(
&self,
aOccurredDuringComposition: *mut bool
) -> nsresult
[src]
&self,
aOccurredDuringComposition: *mut bool
) -> nsresult
/**
* This attribute has a valid value when type is "notify-selection-change".
* If the selection change occurred during composition, this is set to true.
* Otherwise, false.
*/
readonly attribute boolean occurredDuringComposition;
pub unsafe fn GetRemovedLength(&self, aRemovedLength: *mut uint32_t) -> nsresult
[src]
/**
* This attribute has a valid value when type is "notify-text-change".
* This is removed text length by the change(s). If this is empty, new text
* was just inserted. Otherwise, the text is replaced with new text.
*/
readonly attribute unsigned long removedLength;
pub unsafe fn GetAddedLength(&self, aAddedLength: *mut uint32_t) -> nsresult
[src]
/**
* This attribute has a valid value when type is "notify-text-change".
* This is added text length by the change(s). If this is empty, old text
* was just deleted. Otherwise, the text replaces the old text.
*/
readonly attribute unsigned long addedLength;
pub unsafe fn GetCausedOnlyByComposition(
&self,
aCausedOnlyByComposition: *mut bool
) -> nsresult
[src]
&self,
aCausedOnlyByComposition: *mut bool
) -> nsresult
/**
* This attribute has a valid value when type is "notify-text-change".
* If the text change(s) was caused only by composition, this is set to true.
* Otherwise, false. I.e., if one of text changes are caused by JS or
* modifying without composition, this is set to false.
*/
readonly attribute boolean causedOnlyByComposition;
pub unsafe fn GetIncludingChangesDuringComposition(
&self,
aIncludingChangesDuringComposition: *mut bool
) -> nsresult
[src]
&self,
aIncludingChangesDuringComposition: *mut bool
) -> nsresult
/**
* This attribute has a valid value when type is "notify-text-change".
* If at least one text change not caused by composition occurred during
* composition, this is set to true. Otherwise, false.
* Note that this is set to false when new change is caused by neither
* composition nor occurred during composition because it's outdated for
* new composition.
* In other words, when text changes not caused by composition occurred
* during composition and it may cause committing composition, this is
* set to true.
*/
readonly attribute boolean includingChangesDuringComposition;
pub unsafe fn GetIncludingChangesWithoutComposition(
&self,
aIncludingChangesWithoutComposition: *mut bool
) -> nsresult
[src]
&self,
aIncludingChangesWithoutComposition: *mut bool
) -> nsresult
/**
* This attribute has a valid value when type is "notify-text-change".
* If at least one text change occurred when there was no composition, this
* is set to true. Otherwise, false.
*/
readonly attribute boolean includingChangesWithoutComposition;
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsITextInputProcessorNotification
[src]
const IID: nsIID
IID: nsIID = nsID(3234732765, 33467, 17835, [185, 154, 66, 207, 186, 127, 213, 215])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsITextInputProcessorNotification
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsITextInputProcessorNotification
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.