Struct xpcom::interfaces::nsIAlertNotification
[−]
[src]
#[repr(C)]pub struct nsIAlertNotification { /* fields omitted */ }
interface nsIAlertNotification : nsISupports
Methods
impl nsIAlertNotification
[src]
pub fn coerce<T: nsIAlertNotificationCoerce>(&self) -> &T
[src]
Cast this nsIAlertNotification
to one of its base interfaces.
impl nsIAlertNotification
[src]
pub unsafe fn Init(
&self,
aName: &nsAString,
aImageURL: &nsAString,
aTitle: &nsAString,
aText: &nsAString,
aTextClickable: bool,
aCookie: &nsAString,
aDir: &nsAString,
aLang: &nsAString,
aData: &nsAString,
aPrincipal: *const nsIPrincipal,
aInPrivateBrowsing: bool,
aRequireInteraction: bool
) -> nsresult
[src]
&self,
aName: &nsAString,
aImageURL: &nsAString,
aTitle: &nsAString,
aText: &nsAString,
aTextClickable: bool,
aCookie: &nsAString,
aDir: &nsAString,
aLang: &nsAString,
aData: &nsAString,
aPrincipal: *const nsIPrincipal,
aInPrivateBrowsing: bool,
aRequireInteraction: bool
) -> nsresult
/** Initializes an alert notification. */
void init ([optional] in AString aName, [optional] in AString aImageURL, [optional] in AString aTitle, [optional] in AString aText, [optional] in boolean aTextClickable, [optional] in AString aCookie, [optional] in AString aDir, [optional] in AString aLang, [optional] in AString aData, [optional] in nsIPrincipal aPrincipal, [optional] in boolean aInPrivateBrowsing, [optional] in boolean aRequireInteraction);
pub unsafe fn GetName(&self, aName: &mut nsAString) -> nsresult
[src]
/**
* The name of the notification. On Android, the name is hashed and used as
* a notification ID. Notifications will replace previous notifications with
* the same name.
*/
readonly attribute AString name;
pub unsafe fn GetImageURL(&self, aImageURL: &mut nsAString) -> nsresult
[src]
/**
* A URL identifying the image to put in the alert. The OS X backend limits
* the amount of time it will wait for the image to load to six seconds. After
* that time, the alert will show without an image.
*/
readonly attribute AString imageURL;
pub unsafe fn GetTitle(&self, aTitle: &mut nsAString) -> nsresult
[src]
/** The title for the alert. */
readonly attribute AString title;
pub unsafe fn GetText(&self, aText: &mut nsAString) -> nsresult
[src]
/** The contents of the alert. */
readonly attribute AString text;
pub unsafe fn GetTextClickable(&self, aTextClickable: *mut bool) -> nsresult
[src]
/**
* Controls the click behavior. If true, the alert listener will be notified
* when the user clicks on the alert.
*/
readonly attribute boolean textClickable;
pub unsafe fn GetCookie(&self, aCookie: &mut nsAString) -> nsresult
[src]
/**
* An opaque cookie that will be passed to the alert listener for each
* callback.
*/
readonly attribute AString cookie;
pub unsafe fn GetDir(&self, aDir: &mut nsAString) -> nsresult
[src]
/**
* Bidi override for the title and contents. Valid values are "auto", "ltr",
* or "rtl". Ignored if the backend doesn't support localization.
*/
readonly attribute AString dir;
pub unsafe fn GetLang(&self, aLang: &mut nsAString) -> nsresult
[src]
/**
* Language of the title and text. Ignored if the backend doesn't support
* localization.
*/
readonly attribute AString lang;
pub unsafe fn GetData(&self, aData: &mut nsAString) -> nsresult
[src]
/**
* A Base64-encoded structured clone buffer containing data associated with
* this alert. Only used for web notifications. Chrome callers should use a
* cookie instead.
*/
readonly attribute AString data;
pub unsafe fn GetPrincipal(
&self,
aPrincipal: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aPrincipal: *mut *const nsIPrincipal
) -> nsresult
/**
* The principal of the page that created the alert. Used for IPC security
* checks, and to determine whether the alert is actionable.
*/
readonly attribute nsIPrincipal principal;
pub unsafe fn GetURI(&self, aURI: *mut *const nsIURI) -> nsresult
[src]
/**
* The URI of the page that created the alert. |null| if the alert is not
* actionable.
*/
readonly attribute nsIURI URI;
pub unsafe fn GetInPrivateBrowsing(
&self,
aInPrivateBrowsing: *mut bool
) -> nsresult
[src]
&self,
aInPrivateBrowsing: *mut bool
) -> nsresult
/**
* Controls the image loading behavior. If true, the image request will be
* loaded anonymously (without cookies or authorization tokens).
*/
readonly attribute boolean inPrivateBrowsing;
pub unsafe fn GetRequireInteraction(
&self,
aRequireInteraction: *mut bool
) -> nsresult
[src]
&self,
aRequireInteraction: *mut bool
) -> nsresult
/**
* Indicates that the notification should remain readily available until
* the user activates or dismisses the notification.
*/
readonly attribute boolean requireInteraction;
pub unsafe fn GetActionable(&self, aActionable: *mut bool) -> nsresult
[src]
/**
* Indicates whether this alert should show the source string and action
* buttons. False for system alerts (which can omit the principal), or
* expanded, system, and null principals.
*/
readonly attribute boolean actionable;
pub unsafe fn GetSource(&self, aSource: &mut nsAString) -> nsresult
[src]
/**
* The host and port of the originating page, or an empty string if the alert
* is not actionable.
*/
readonly attribute AString source;
pub unsafe fn LoadImage(
&self,
aTimeout: uint32_t,
aListener: *const nsIAlertNotificationImageListener,
aUserData: *const nsISupports,
_retval: *mut *const nsICancelable
) -> nsresult
[src]
&self,
aTimeout: uint32_t,
aListener: *const nsIAlertNotificationImageListener,
aUserData: *const nsISupports,
_retval: *mut *const nsICancelable
) -> nsresult
/**
* Loads the image associated with this alert.
*
* @param aTimeout The number of milliseconds to wait before cancelling the
* image request. If zero, there is no timeout.
* @param aListener An |nsIAlertNotificationImageListener| implementation,
* notified when the image loads. The listener is kept alive
* until the request completes.
* @param aUserData An opaque parameter passed to the listener's methods.
* Not used by the libnotify backend, but the OS X backend
* passes the pending notification.
*/
nsICancelable loadImage (in unsigned long aTimeout, in nsIAlertNotificationImageListener aListener, [optional] in nsISupports aUserData);
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 nsIAlertNotification
[src]
const IID: nsIID
IID: nsIID = nsID(3475918006, 19343, 20170, [174, 169, 213, 26, 143, 159, 122, 80])
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 nsIAlertNotification
[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 nsIAlertNotification
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.