1 /* -*- Mode: C++; 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
"nsISupports.idl"
7 #include
"domstubs.idl"
9 interface nsIHTMLObjectResizeListener
;
11 [scriptable
, uuid(8b396020
-69d3
-451f
-80c1
-1a96a7da25a9
)]
13 interface nsIHTMLObjectResizer
: nsISupports
16 typedef short EResizerLocation
;
18 const short eTopLeft
= 0;
20 const short eTopRight
= 2;
21 const short eLeft
= 3;
22 const short eRight
= 4;
23 const short eBottomLeft
= 5;
24 const short eBottom
= 6;
25 const short eBottomRight
= 7;
28 * the element currently displaying resizers
30 readonly attribute nsIDOMElement resizedObject
;
33 * a boolean indicating if object resizing is enabled in the editor
35 attribute
boolean objectResizingEnabled
;
38 * Shows active resizers around an element's frame
39 * @param aResizedElement [IN] a DOM Element
41 void showResizers
(in nsIDOMElement aResizedElement
);
44 * Hide resizers if they are visible
49 * Refresh visible resizers
51 void refreshResizers
();
54 * event callback when a mouse button is pressed
55 * @param aX [IN] horizontal position of the pointer
56 * @param aY [IN] vertical position of the pointer
57 * @param aTarget [IN] the element triggering the event
58 * @param aMouseEvent [IN] the event
60 void mouseDown
(in long aX
, in long aY
,
61 in nsIDOMElement aTarget
, in nsIDOMEvent aMouseEvent
);
64 * event callback when a mouse button is released
65 * @param aX [IN] horizontal position of the pointer
66 * @param aY [IN] vertical position of the pointer
67 * @param aTarget [IN] the element triggering the event
69 void mouseUp
(in long aX
, in long aY
,
70 in nsIDOMElement aTarget
);
73 * event callback when the mouse pointer is moved
74 * @param aMouseEvent [IN] the event
76 void mouseMove
(in nsIDOMEvent aMouseEvent
);
81 * Creates a resize listener that can be used to get notifications
82 * that the user started to resize an object or finalized such an operation
83 * @param aListener [IN] an instance of nsIHTMLObjectResizeListener
85 void addObjectResizeEventListener
(in nsIHTMLObjectResizeListener aListener
);
88 * Deletes a resize listener
89 * @param aListener [IN] an instance of nsIHTMLObjectResizeListener
91 void removeObjectResizeEventListener
(in nsIHTMLObjectResizeListener aListener
);