Struct xpcom::interfaces::nsIAlertNotification [] [src]

#[repr(C)]
pub struct nsIAlertNotification { /* fields omitted */ }

interface nsIAlertNotification : nsISupports

Methods

impl nsIAlertNotification
[src]

[src]

Cast this nsIAlertNotification to one of its base interfaces.

impl nsIAlertNotification
[src]

[src]

/** 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);

[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;

[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;

[src]

/** The title for the alert. */

readonly attribute AString title;

[src]

/** The contents of the alert. */

readonly attribute AString text;

[src]

/**
   * Controls the click behavior. If true, the alert listener will be notified
   * when the user clicks on the alert.
   */

readonly attribute boolean textClickable;

[src]

/**
   * An opaque cookie that will be passed to the alert listener for each
   * callback.
   */

readonly attribute AString cookie;

[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;

[src]

/**
   * Language of the title and text. Ignored if the backend doesn't support
   * localization.
   */

readonly attribute AString lang;

[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;

[src]

/**
   * 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;

[src]

/**
   * The URI of the page that created the alert. |null| if the alert is not
   * actionable.
   */

readonly attribute nsIURI URI;

[src]

/**
   * Controls the image loading behavior. If true, the image request will be
   * loaded anonymously (without cookies or authorization tokens).
   */

readonly attribute boolean inPrivateBrowsing;

[src]

/**
   * Indicates that the notification should remain readily available until
   * the user activates or dismisses the notification.
   */

readonly attribute boolean requireInteraction;

[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;

[src]

/**
   * The host and port of the originating page, or an empty string if the alert
   * is not actionable.
   */

readonly attribute AString source;

[src]

/**
   * 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>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIAlertNotification
[src]

IID: nsIID = nsID(3475918006, 19343, 20170, [174, 169, 213, 26, 143, 159, 122, 80])

[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]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIAlertNotification
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.