Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / svg / base / src / nsISVGChildFrame.h
blob551c1b243a333b1863f214d6ee7ba9c1b0118f9a
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is the Mozilla SVG project.
17 * The Initial Developer of the Original Code is
18 * Crocodile Clips Ltd..
19 * Portions created by the Initial Developer are Copyright (C) 2002
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Alex Fritze <alex.fritze@crocodile-clips.com> (original author)
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #ifndef __NS_ISVGCHILDFRAME_H__
40 #define __NS_ISVGCHILDFRAME_H__
43 #include "nsISupports.h"
44 #include "nsCOMPtr.h"
45 #include "nsRect.h"
47 class gfxContext;
48 class nsPresContext;
49 class nsIDOMSVGRect;
50 class nsIDOMSVGMatrix;
51 class nsSVGRenderState;
53 #define NS_ISVGCHILDFRAME_IID \
54 { 0xfc3ee9b2, 0xaf40, 0x416d, \
55 { 0xa8, 0x51, 0xb4, 0x68, 0xa4, 0xe4, 0x8b, 0xcd } }
57 class nsISVGChildFrame : public nsISupports {
58 public:
60 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISVGCHILDFRAME_IID)
62 // Paint this frame - aDirtyRect is the area being redrawn, in frame
63 // offset pixel coordinates
64 NS_IMETHOD PaintSVG(nsSVGRenderState* aContext,
65 const nsIntRect *aDirtyRect)=0;
67 // Check if this frame or children contain the given point,
68 // specified in app units relative to the origin of the outer
69 // svg frame (origin ill-defined in the case of borders - bug
70 // 290770). See bug 290852 for foreignObject complications.
71 NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint)=0;
73 // Get bounds in our gfxContext's coordinates space (in app units)
74 NS_IMETHOD_(nsRect) GetCoveredRegion()=0;
75 NS_IMETHOD UpdateCoveredRegion()=0;
77 // Called once on SVG child frames except descendants of <defs>, either
78 // when their nsSVGOuterSVGFrame receives its initial reflow (i.e. once
79 // the SVG viewport dimensions are known), or else when they're inserted
80 // into the frame tree (if they're inserted after the initial reflow).
81 NS_IMETHOD InitialUpdate()=0;
83 // Flags to pass to NotifySVGChange:
85 // SUPPRESS_INVALIDATION - do not invalidate rendered areas (only to be
86 // used in conjunction with TRANSFORM_CHANGED)
87 // TRANSFORM_CHANGED - the current transform matrix for this frame has changed
88 // COORD_CONTEXT_CHANGED - the dimensions of this frame's coordinate context has
89 // changed (percentage lengths must be reevaluated)
90 enum SVGChangedFlags {
91 SUPPRESS_INVALIDATION = 0x01,
92 TRANSFORM_CHANGED = 0x02,
93 COORD_CONTEXT_CHANGED = 0x04
95 virtual void NotifySVGChanged(PRUint32 aFlags)=0;
96 NS_IMETHOD NotifyRedrawSuspended()=0;
97 NS_IMETHOD NotifyRedrawUnsuspended()=0;
99 // Set whether we should stop multiplying matrices when building up
100 // the current transformation matrix at this frame.
101 NS_IMETHOD SetMatrixPropagation(PRBool aPropagate)=0;
102 virtual PRBool GetMatrixPropagation()=0;
104 // XXX move this function into interface nsISVGLocatableMetrics
105 NS_IMETHOD GetBBox(nsIDOMSVGRect **_retval)=0; // bbox in local coords
107 // Are we a container frame?
108 NS_IMETHOD_(PRBool) IsDisplayContainer()=0;
110 // Does this frame have an current covered region in mRect (aka GetRect())?
111 NS_IMETHOD_(PRBool) HasValidCoveredRect()=0;
114 NS_DEFINE_STATIC_IID_ACCESSOR(nsISVGChildFrame, NS_ISVGCHILDFRAME_IID)
116 #endif // __NS_ISVGCHILDFRAME_H__