dom/interfaces/html/nsIDOMHTMLCanvasElement.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial