dom/interfaces/html/nsIDOMHTMLCanvasElement.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsIDOMHTMLElement.idl"
     8 /**
     9  * The nsIDOMHTMLCanvasElement interface is the interface to a HTML
    10  * <canvas> element.
    11  *
    12  * For more information on this interface, please see
    13  * http://www.whatwg.org/specs/web-apps/current-work/#graphics
    14  *
    15  * @status UNDER_DEVELOPMENT
    16  */
    18 interface nsIDOMBlob;
    19 interface nsIDOMFile;
    20 interface nsIVariant;
    21 interface nsIInputStreamCallback;
    23 [scriptable, uuid(8978d1c5-2981-4678-a1c3-b0b7bae04fbc)]
    24 interface nsIDOMHTMLCanvasElement : nsISupports
    25 {
    26   attribute unsigned long width;
    27   attribute unsigned long height;
    28   attribute boolean mozOpaque;
    30   // Valid calls are:
    31   //  toDataURL();              -- defaults to image/png
    32   //  toDataURL(type);          -- uses given type
    33   //  toDataURL(type, params);  -- uses given type, and any valid parameters
    34   [implicit_jscontext]
    35   DOMString toDataURL([optional] in DOMString type,
    36                       [optional] in jsval params);
    38   // Valid calls are
    39   // mozGetAsFile(name);              -- defaults to image/png
    40   // mozGetAsFile(name, type);        -- uses given type
    41   nsIDOMFile mozGetAsFile(in DOMString name, [optional] in DOMString type);
    43   // A Mozilla-only extension to get a canvas context backed by double-buffered
    44   // shared memory. Only privileged callers can call this.
    45   nsISupports MozGetIPCContext(in DOMString contextId);
    47   // A Mozilla-only extension that returns the canvas' image data as a data
    48   // stream in the desired image format.
    49   void mozFetchAsStream(in nsIInputStreamCallback callback,
    50                                         [optional] in DOMString type);
    51 };

mercurial