1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/idl/nsIHTMLObjectResizer.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,93 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 +#include "domstubs.idl" 1.11 + 1.12 +interface nsIHTMLObjectResizeListener; 1.13 + 1.14 +[scriptable, uuid(8b396020-69d3-451f-80c1-1a96a7da25a9)] 1.15 + 1.16 +interface nsIHTMLObjectResizer : nsISupports 1.17 +{ 1.18 +%{C++ 1.19 + typedef short EResizerLocation; 1.20 +%} 1.21 + const short eTopLeft = 0; 1.22 + const short eTop = 1; 1.23 + const short eTopRight = 2; 1.24 + const short eLeft = 3; 1.25 + const short eRight = 4; 1.26 + const short eBottomLeft = 5; 1.27 + const short eBottom = 6; 1.28 + const short eBottomRight = 7; 1.29 + 1.30 + /** 1.31 + * the element currently displaying resizers 1.32 + */ 1.33 + readonly attribute nsIDOMElement resizedObject; 1.34 + 1.35 + /** 1.36 + * a boolean indicating if object resizing is enabled in the editor 1.37 + */ 1.38 + attribute boolean objectResizingEnabled; 1.39 + 1.40 + /** 1.41 + * Shows active resizers around an element's frame 1.42 + * @param aResizedElement [IN] a DOM Element 1.43 + */ 1.44 + void showResizers(in nsIDOMElement aResizedElement); 1.45 + 1.46 + /** 1.47 + * Hide resizers if they are visible 1.48 + */ 1.49 + void hideResizers(); 1.50 + 1.51 + /** 1.52 + * Refresh visible resizers 1.53 + */ 1.54 + void refreshResizers(); 1.55 + 1.56 + /** 1.57 + * event callback when a mouse button is pressed 1.58 + * @param aX [IN] horizontal position of the pointer 1.59 + * @param aY [IN] vertical position of the pointer 1.60 + * @param aTarget [IN] the element triggering the event 1.61 + * @param aMouseEvent [IN] the event 1.62 + */ 1.63 + void mouseDown(in long aX, in long aY, 1.64 + in nsIDOMElement aTarget, in nsIDOMEvent aMouseEvent); 1.65 + 1.66 + /** 1.67 + * event callback when a mouse button is released 1.68 + * @param aX [IN] horizontal position of the pointer 1.69 + * @param aY [IN] vertical position of the pointer 1.70 + * @param aTarget [IN] the element triggering the event 1.71 + */ 1.72 + void mouseUp(in long aX, in long aY, 1.73 + in nsIDOMElement aTarget); 1.74 + 1.75 + /** 1.76 + * event callback when the mouse pointer is moved 1.77 + * @param aMouseEvent [IN] the event 1.78 + */ 1.79 + void mouseMove(in nsIDOMEvent aMouseEvent); 1.80 + 1.81 + /* Event Listeners */ 1.82 + 1.83 + /** 1.84 + * Creates a resize listener that can be used to get notifications 1.85 + * that the user started to resize an object or finalized such an operation 1.86 + * @param aListener [IN] an instance of nsIHTMLObjectResizeListener 1.87 + */ 1.88 + void addObjectResizeEventListener(in nsIHTMLObjectResizeListener aListener); 1.89 + 1.90 + /** 1.91 + * Deletes a resize listener 1.92 + * @param aListener [IN] an instance of nsIHTMLObjectResizeListener 1.93 + */ 1.94 + void removeObjectResizeEventListener(in nsIHTMLObjectResizeListener aListener); 1.95 +}; 1.96 +