content/html/document/public/nsIImageDocument.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: C++; 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 "nsISupports.idl"
michael@0 7
michael@0 8 /**
michael@0 9 * @status UNDER_DEVELOPMENT
michael@0 10 */
michael@0 11
michael@0 12 interface imgIRequest;
michael@0 13
michael@0 14 [scriptable, uuid(87c27f98-37dc-4b64-a8cd-92003624bcee)]
michael@0 15 interface nsIImageDocument : nsISupports {
michael@0 16
michael@0 17 /* Whether the pref for image resizing has been set. */
michael@0 18 readonly attribute boolean imageResizingEnabled;
michael@0 19
michael@0 20 /* Whether the image is overflowing visible area. */
michael@0 21 readonly attribute boolean imageIsOverflowing;
michael@0 22
michael@0 23 /* Whether the image has been resized to fit visible area. */
michael@0 24 readonly attribute boolean imageIsResized;
michael@0 25
michael@0 26 /* The image request being displayed in the content area */
michael@0 27 readonly attribute imgIRequest imageRequest;
michael@0 28
michael@0 29 /* Resize the image to fit visible area. */
michael@0 30 [binaryname(DOMShrinkToFit)]
michael@0 31 void shrinkToFit();
michael@0 32
michael@0 33 /* Restore image original size. */
michael@0 34 [binaryname(DOMRestoreImage)]
michael@0 35 void restoreImage();
michael@0 36
michael@0 37 /* Restore the image, trying to keep a certain pixel in the same position.
michael@0 38 * The coordinate system is that of the shrunken image.
michael@0 39 */
michael@0 40 [binaryname(DOMRestoreImageTo)]
michael@0 41 void restoreImageTo(in long x, in long y);
michael@0 42
michael@0 43 /* A helper method for switching between states.
michael@0 44 * The switching logic is as follows. If the image has been resized
michael@0 45 * restore image original size, otherwise if the image is overflowing
michael@0 46 * current visible area resize the image to fit the area.
michael@0 47 */
michael@0 48 [binaryname(DOMToggleImageSize)]
michael@0 49 void toggleImageSize();
michael@0 50 };

mercurial