initial import
[vuplus_webkit] / Source / WebKit / win / Interfaces / IWebFramePrivate.idl
1 /*
2  * Copyright (C) 2006, 2007, 2008 Apple Inc.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24  */
25
26 #ifndef DO_NO_IMPORTS
27 import "oaidl.idl";
28 import "ocidl.idl";
29 import "IWebFrame.idl";
30 #endif
31
32 interface IWebFrame;
33 interface IWebScriptWorld;
34
35 typedef enum {
36     WebFrameLoadTypeStandard,
37     WebFrameLoadTypeBack,
38     WebFrameLoadTypeForward,
39     WebFrameLoadTypeIndexedBackForward, // a multi-item hop in the backforward list
40     WebFrameLoadTypeReload,
41     WebFrameLoadTypeReloadAllowingStaleData,
42     WebFrameLoadTypeSame,               // user loads same URL again (but not reload button)
43     WebFrameLoadTypeRedirectWithLockedBackForwardList,
44     WebFrameLoadTypeReplace,
45     WebFrameLoadTypeReloadFromOrigin,
46 } WebFrameLoadType;
47
48 [
49     object,
50     oleautomation,
51     uuid(A1657D07-4881-4475-9D10-76548731D448),
52     pointer_default(unique)
53 ]
54
55 interface IWebFramePrivate : IUnknown
56 {
57     HRESULT unused1([out, retval] BSTR*);
58     HRESULT scrollOffset([out, retval] SIZE* offset);
59
60     // FIXME: This shouldn't be needed once IWebDocumentView is implemented.
61     HRESULT layout();
62     HRESULT firstLayoutDone([out, retval] BOOL* result);
63     HRESULT loadType([out, retval] WebFrameLoadType* type);
64
65     HRESULT setInPrintingMode([in] BOOL value, [in] HDC printDC);
66     HRESULT getPrintedPageCount([in] HDC printDC, [out, retval] UINT* pageCount);
67     [local] HRESULT spoolPages([in] HDC printDC, [in] UINT startPage, [in] UINT endPage, [out, retval] void* ctx);
68
69     HRESULT isFrameSet([out, retval] BOOL* result);
70     HRESULT string([out, retval] BSTR* result);
71
72     HRESULT size([out, retval] SIZE* size);
73     HRESULT hasScrollBars([out, retval] BOOL* result);
74     HRESULT contentBounds([out, retval] RECT* result);
75     HRESULT frameBounds([out, retval] RECT* result);
76
77     HRESULT isDescendantOfFrame([in] IWebFrame* ancestor, [out, retval] BOOL* result);
78
79     HRESULT pendingFrameUnloadEventCount([out, retval] UINT* result);
80
81     HRESULT unused2();
82
83     HRESULT paintDocumentRectToContext([in] RECT rect, [in] OLE_HANDLE deviceContext);
84
85     HRESULT elementDoesAutoComplete([in] IDOMElement* element, [out, retval] BOOL* result);
86
87     HRESULT pauseAnimation([in] BSTR animationName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning);
88     HRESULT pauseTransition([in] BSTR propertyName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* transitionWasRunning);
89     HRESULT numberOfActiveAnimations([out, retval] UINT* number);
90
91     HRESULT isDisplayingStandaloneImage([out, retval] BOOL* result);
92
93     HRESULT allowsFollowingLink([in] BSTR url, [out, retval] BOOL* result);
94
95     [local] HRESULT stringByEvaluatingJavaScriptInScriptWorld([in] IWebScriptWorld*, [in] JSObjectRef globalObject, [in] BSTR script, [out, retval] BSTR* result);
96
97     [local] JSGlobalContextRef globalContextForScriptWorld([in] IWebScriptWorld*);
98
99     HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result);
100
101     HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning);
102
103     HRESULT visibleContentRect([out, retval] RECT*);
104
105     HRESULT pageNumberForElementById([in] BSTR id, [in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber);
106
107     HRESULT numberOfPages([in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber);
108
109     HRESULT layerTreeAsText([out, retval] BSTR* result);
110
111     HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE deviceContext);
112
113     HRESULT renderTreeAsExternalRepresentation([in] BOOL forPrinting, [out, retval] BSTR* result);
114
115     HRESULT suspendAnimations();
116     HRESULT resumeAnimations();
117
118     HRESULT loadPlainTextString([in] BSTR string, [in] BSTR url);
119
120     HRESULT hasSpellingMarker([in] UINT from, [in] UINT length, [out, retval] BOOL* result);
121     
122     HRESULT clearOpener();
123
124     HRESULT setTextDirection([in] BSTR direction);
125 }