Struct xpcom::interfaces::nsIAutoCompleteSimpleResult
[−]
[src]
#[repr(C)]pub struct nsIAutoCompleteSimpleResult { /* fields omitted */ }
interface nsIAutoCompleteSimpleResult : nsIAutoCompleteResult
/**
* This class implements nsIAutoCompleteResult and provides simple methods
* for setting the value and result items. It can be used whenever some basic
* auto complete results are needed that can be pre-generated and filled into
* an array.
*/
Methods
impl nsIAutoCompleteSimpleResult
[src]
pub fn coerce<T: nsIAutoCompleteSimpleResultCoerce>(&self) -> &T
[src]
Cast this nsIAutoCompleteSimpleResult
to one of its base interfaces.
impl nsIAutoCompleteSimpleResult
[src]
pub unsafe fn SetSearchString(&self, aSearchString: &nsAString) -> nsresult
[src]
/**
* A writer for the readonly attribute 'searchString' which should contain
* the string that the user typed.
*/
void setSearchString (in AString aSearchString);
pub unsafe fn SetErrorDescription(
&self,
aErrorDescription: &nsAString
) -> nsresult
[src]
&self,
aErrorDescription: &nsAString
) -> nsresult
/**
* A writer for the readonly attribute 'errorDescription'.
*/
void setErrorDescription (in AString aErrorDescription);
pub unsafe fn SetDefaultIndex(&self, aDefaultIndex: int32_t) -> nsresult
[src]
/**
* A writer for the readonly attribute 'defaultIndex' which should contain
* the index of the list that will be selected by default (normally 0).
*/
void setDefaultIndex (in long aDefaultIndex);
pub unsafe fn SetSearchResult(&self, aSearchResult: uint16_t) -> nsresult
[src]
/**
* A writer for the readonly attribute 'searchResult' which should contain
* one of the constants nsIAutoCompleteResult.RESULT_* indicating the success
* of the search.
*/
void setSearchResult (in unsigned short aSearchResult);
pub unsafe fn InsertMatchAt(
&self,
aIndex: int32_t,
aValue: &nsAString,
aComment: &nsAString,
aImage: &nsAString,
aStyle: &nsAString,
aFinalCompleteValue: &nsAString,
aLabel: &nsAString
) -> nsresult
[src]
&self,
aIndex: int32_t,
aValue: &nsAString,
aComment: &nsAString,
aImage: &nsAString,
aStyle: &nsAString,
aFinalCompleteValue: &nsAString,
aLabel: &nsAString
) -> nsresult
/**
* Inserts a match consisting of the given value, comment, image, style and
* the value to use for defaultIndex completion at a given position.
* @param aIndex
* The index to insert at
* @param aValue
* The value to autocomplete to
* @param aComment
* Comment shown in the autocomplete widget to describe this match
* @param aImage
* Image shown in the autocomplete widget for this match.
* @param aStyle
* Describes how to style the match in the autocomplete widget
* @param aFinalCompleteValue
* Value used when the user confirms selecting this match. If not
* provided, aValue will be used.
*/
void insertMatchAt (in long aIndex, in AString aValue, in AString aComment, [optional] in AString aImage, [optional] in AString aStyle, [optional] in AString aFinalCompleteValue, [optional] in AString aLabel);
pub unsafe fn AppendMatch(
&self,
aValue: &nsAString,
aComment: &nsAString,
aImage: &nsAString,
aStyle: &nsAString,
aFinalCompleteValue: &nsAString,
aLabel: &nsAString
) -> nsresult
[src]
&self,
aValue: &nsAString,
aComment: &nsAString,
aImage: &nsAString,
aStyle: &nsAString,
aFinalCompleteValue: &nsAString,
aLabel: &nsAString
) -> nsresult
/**
* Appends a match consisting of the given value, comment, image, style and
* the value to use for defaultIndex completion.
* @param aValue
* The value to autocomplete to
* @param aComment
* Comment shown in the autocomplete widget to describe this match
* @param aImage
* Image shown in the autocomplete widget for this match.
* @param aStyle
* Describes how to style the match in the autocomplete widget
* @param aFinalCompleteValue
* Value used when the user confirms selecting this match. If not
* provided, aValue will be used.
*/
void appendMatch (in AString aValue, in AString aComment, [optional] in AString aImage, [optional] in AString aStyle, [optional] in AString aFinalCompleteValue, [optional] in AString aLabel);
pub unsafe fn RemoveMatchAt(&self, aIndex: int32_t) -> nsresult
[src]
/**
* Removes an existing match.
* @note this is different from removeValueAt, since it's not a consequence of
* a user action, and as such it won't notify onValueRemoved.
*/
void removeMatchAt (in long aIndex);
pub unsafe fn GetListener(
&self,
_retval: *mut *const nsIAutoCompleteSimpleResultListener
) -> nsresult
[src]
&self,
_retval: *mut *const nsIAutoCompleteSimpleResultListener
) -> nsresult
/**
* Gets the listener for changes in the result.
*/
nsIAutoCompleteSimpleResultListener getListener ();
pub unsafe fn SetListener(
&self,
aListener: *const nsIAutoCompleteSimpleResultListener
) -> nsresult
[src]
&self,
aListener: *const nsIAutoCompleteSimpleResultListener
) -> nsresult
/**
* Sets a listener for changes in the result.
*/
void setListener (in nsIAutoCompleteSimpleResultListener aListener);
Methods from Deref<Target = nsIAutoCompleteResult>
pub fn coerce<T: nsIAutoCompleteResultCoerce>(&self) -> &T
[src]
Cast this nsIAutoCompleteResult
to one of its base interfaces.
pub const RESULT_IGNORED: i64
pub const RESULT_FAILURE: i64
pub const RESULT_NOMATCH: i64
pub const RESULT_SUCCESS: i64
pub const RESULT_NOMATCH_ONGOING: i64
pub const RESULT_SUCCESS_ONGOING: i64
pub unsafe fn GetSearchString(&self, aSearchString: &mut nsAString) -> nsresult
[src]
/**
* The original search string
*/
readonly attribute AString searchString;
pub unsafe fn GetSearchResult(&self, aSearchResult: *mut uint16_t) -> nsresult
[src]
/**
* The result of the search
*/
readonly attribute unsigned short searchResult;
pub unsafe fn GetDefaultIndex(&self, aDefaultIndex: *mut int32_t) -> nsresult
[src]
/**
* Index of the default item that should be entered if none is selected
*/
readonly attribute long defaultIndex;
pub unsafe fn GetErrorDescription(
&self,
aErrorDescription: &mut nsAString
) -> nsresult
[src]
&self,
aErrorDescription: &mut nsAString
) -> nsresult
/**
* A string describing the cause of a search failure
*/
readonly attribute AString errorDescription;
pub unsafe fn GetMatchCount(&self, aMatchCount: *mut uint32_t) -> nsresult
[src]
/**
* The number of matches
*/
readonly attribute unsigned long matchCount;
pub unsafe fn GetValueAt(
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Get the value of the result at the given index
*/
AString getValueAt (in long index);
pub unsafe fn GetLabelAt(
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
/**
* This returns the string that is displayed in the dropdown
*/
AString getLabelAt (in long index);
pub unsafe fn GetCommentAt(
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Get the comment of the result at the given index
*/
AString getCommentAt (in long index);
pub unsafe fn GetStyleAt(
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Get the style hint for the result at the given index
*/
AString getStyleAt (in long index);
pub unsafe fn GetImageAt(
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Get the image of the result at the given index
*/
AString getImageAt (in long index);
pub unsafe fn GetFinalCompleteValueAt(
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
index: int32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Get the final value that should be completed when the user confirms
* the match at the given index.
*/
AString getFinalCompleteValueAt (in long index);
pub unsafe fn RemoveValueAt(
&self,
rowIndex: int32_t,
removeFromDb: bool
) -> nsresult
[src]
&self,
rowIndex: int32_t,
removeFromDb: bool
) -> nsresult
/**
* Remove the value at the given index from the autocomplete results.
* If removeFromDb is set to true, the value should be removed from
* persistent storage as well.
*/
void removeValueAt (in long rowIndex, in boolean removeFromDb);
Trait Implementations
impl XpCom for nsIAutoCompleteSimpleResult
[src]
const IID: nsIID
IID: nsIID = nsID(601791638, 48843, 19725, [169, 187, 29, 19, 28, 227, 97, 181])
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 nsIAutoCompleteSimpleResult
[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 nsIAutoCompleteSimpleResult
[src]
type Target = nsIAutoCompleteResult
The resulting type after dereferencing.
fn deref(&self) -> &nsIAutoCompleteResult
[src]
Dereferences the value.