| 1 |
// FIXME; IID's are not consistant with SWT version |
|---|
| 2 |
|
|---|
| 3 |
module dwt.internal.mozilla.nsIDocShell; |
|---|
| 4 |
|
|---|
| 5 |
import dwt.internal.mozilla.Common; |
|---|
| 6 |
import dwt.internal.mozilla.nsID; |
|---|
| 7 |
import dwt.internal.mozilla.nsISupports; |
|---|
| 8 |
|
|---|
| 9 |
import dwt.internal.mozilla.nsIURI; |
|---|
| 10 |
import dwt.internal.mozilla.nsIChannel; |
|---|
| 11 |
import dwt.internal.mozilla.nsIContentViewer; |
|---|
| 12 |
import dwt.internal.mozilla.nsIURIContentListener; |
|---|
| 13 |
import dwt.internal.mozilla.nsIChromeEventHandler; |
|---|
| 14 |
import dwt.internal.mozilla.nsIDocShellLoadInfo; |
|---|
| 15 |
import dwt.internal.mozilla.nsIDocumentCharsetInfo; |
|---|
| 16 |
import dwt.internal.mozilla.nsIWebNavigation; |
|---|
| 17 |
import dwt.internal.mozilla.nsISimpleEnumerator; |
|---|
| 18 |
import dwt.internal.mozilla.nsIInputStream; |
|---|
| 19 |
import dwt.internal.mozilla.nsIRequest; |
|---|
| 20 |
import dwt.internal.mozilla.nsISHEntry; |
|---|
| 21 |
import dwt.internal.mozilla.nsISecureBrowserUI; |
|---|
| 22 |
import dwt.internal.mozilla.nsIDOMStorage; |
|---|
| 23 |
import dwt.internal.mozilla.nsStringAPI; |
|---|
| 24 |
|
|---|
| 25 |
/****************************************************************************** |
|---|
| 26 |
|
|---|
| 27 |
******************************************************************************/ |
|---|
| 28 |
|
|---|
| 29 |
const char[] NS_IDOCSHELL_IID_STR = "69e5de00-7b8b-11d3-af61-00a024ffc08c"; |
|---|
| 30 |
|
|---|
| 31 |
const nsIID NS_IDOCSHELL_IID= |
|---|
| 32 |
{ 0x69e5de00, 0x7b8b, 0x11d3, [0xaf,0x61,0x00,0xa0,0x24,0xff,0xc0,0x8c] }; |
|---|
| 33 |
interface nsIDocShell : nsISupports { |
|---|
| 34 |
|
|---|
| 35 |
static const char[] IID_STR = NS_IDOCSHELL_IID_STR; |
|---|
| 36 |
static const nsIID IID = NS_IDOCSHELL_IID; |
|---|
| 37 |
|
|---|
| 38 |
extern(System): |
|---|
| 39 |
nsresult LoadURI(nsIURI uri, nsIDocShellLoadInfo loadInfo, PRUint32 aLoadFlags, PRBool firstParty); |
|---|
| 40 |
nsresult LoadStream(nsIInputStream aStream, nsIURI aURI, nsACString * aContentType, nsACString * aContentCharset, nsIDocShellLoadInfo aLoadInfo); |
|---|
| 41 |
|
|---|
| 42 |
enum { INTERNAL_LOAD_FLAGS_NONE = 0 }; |
|---|
| 43 |
enum { INTERNAL_LOAD_FLAGS_INHERIT_OWNER = 1 }; |
|---|
| 44 |
enum { INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER = 2 }; |
|---|
| 45 |
enum { INTERNAL_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 4 }; |
|---|
| 46 |
enum { INTERNAL_LOAD_FLAGS_FIRST_LOAD = 8 }; |
|---|
| 47 |
|
|---|
| 48 |
nsresult InternalLoad(nsIURI aURI, nsIURI aReferrer, nsISupports aOwner, PRUint32 aFlags, PRUnichar *aWindowTarget, char *aTypeHint, nsIInputStream aPostDataStream, nsIInputStream aHeadersStream, PRUint32 aLoadFlags, nsISHEntry aSHEntry, PRBool firstParty, nsIDocShell *aDocShell, nsIRequest *aRequest); |
|---|
| 49 |
|
|---|
| 50 |
nsresult CreateLoadInfo(nsIDocShellLoadInfo *loadInfo); |
|---|
| 51 |
nsresult PrepareForNewContentModel(); |
|---|
| 52 |
nsresult SetCurrentURI(nsIURI aURI); |
|---|
| 53 |
nsresult FirePageHideNotification(PRBool isUnload); |
|---|
| 54 |
nsresult GetPresContext(nsPresContext * *aPresContext); |
|---|
| 55 |
nsresult GetPresShell(nsIPresShell * *aPresShell); |
|---|
| 56 |
nsresult GetEldestPresShell(nsIPresShell * *aEldestPresShell); |
|---|
| 57 |
nsresult GetContentViewer(nsIContentViewer *aContentViewer); |
|---|
| 58 |
nsresult GetChromeEventHandler(nsIChromeEventHandler *aChromeEventHandler); |
|---|
| 59 |
nsresult SetChromeEventHandler(nsIChromeEventHandler aChromeEventHandler); |
|---|
| 60 |
nsresult GetDocumentCharsetInfo(nsIDocumentCharsetInfo *aDocumentCharsetInfo); |
|---|
| 61 |
nsresult SetDocumentCharsetInfo(nsIDocumentCharsetInfo aDocumentCharsetInfo); |
|---|
| 62 |
nsresult GetAllowPlugins(PRBool *aAllowPlugins); |
|---|
| 63 |
nsresult SetAllowPlugins(PRBool aAllowPlugins); |
|---|
| 64 |
nsresult GetAllowJavascript(PRBool *aAllowJavascript); |
|---|
| 65 |
nsresult SetAllowJavascript(PRBool aAllowJavascript); |
|---|
| 66 |
nsresult GetAllowMetaRedirects(PRBool *aAllowMetaRedirects); |
|---|
| 67 |
nsresult SetAllowMetaRedirects(PRBool aAllowMetaRedirects); |
|---|
| 68 |
nsresult GetAllowSubframes(PRBool *aAllowSubframes); |
|---|
| 69 |
nsresult SetAllowSubframes(PRBool aAllowSubframes); |
|---|
| 70 |
nsresult GetAllowImages(PRBool *aAllowImages); |
|---|
| 71 |
nsresult SetAllowImages(PRBool aAllowImages); |
|---|
| 72 |
|
|---|
| 73 |
enum { ENUMERATE_FORWARDS = 0 }; |
|---|
| 74 |
enum { ENUMERATE_BACKWARDS = 1 }; |
|---|
| 75 |
|
|---|
| 76 |
nsresult GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator *_retval); |
|---|
| 77 |
|
|---|
| 78 |
enum { APP_TYPE_UNKNOWN = 0U }; |
|---|
| 79 |
enum { APP_TYPE_MAIL = 1U }; |
|---|
| 80 |
enum { APP_TYPE_EDITOR = 2U }; |
|---|
| 81 |
|
|---|
| 82 |
nsresult GetAppType(PRUint32 *aAppType); |
|---|
| 83 |
nsresult SetAppType(PRUint32 aAppType); |
|---|
| 84 |
nsresult GetAllowAuth(PRBool *aAllowAuth); |
|---|
| 85 |
nsresult SetAllowAuth(PRBool aAllowAuth); |
|---|
| 86 |
nsresult GetZoom(float *aZoom); |
|---|
| 87 |
nsresult SetZoom(float aZoom); |
|---|
| 88 |
nsresult GetMarginWidth(PRInt32 *aMarginWidth); |
|---|
| 89 |
nsresult SetMarginWidth(PRInt32 aMarginWidth); |
|---|
| 90 |
nsresult GetMarginHeight(PRInt32 *aMarginHeight); |
|---|
| 91 |
nsresult SetMarginHeight(PRInt32 aMarginHeight); |
|---|
| 92 |
nsresult GetHasFocus(PRBool *aHasFocus); |
|---|
| 93 |
nsresult SetHasFocus(PRBool aHasFocus); |
|---|
| 94 |
nsresult GetCanvasHasFocus(PRBool *aCanvasHasFocus); |
|---|
| 95 |
nsresult SetCanvasHasFocus(PRBool aCanvasHasFocus); |
|---|
| 96 |
nsresult TabToTreeOwner(PRBool forward, PRBool *tookFocus); |
|---|
| 97 |
|
|---|
| 98 |
enum { BUSY_FLAGS_NONE = 0U }; |
|---|
| 99 |
enum { BUSY_FLAGS_BUSY = 1U }; |
|---|
| 100 |
enum { BUSY_FLAGS_BEFORE_PAGE_LOAD = 2U }; |
|---|
| 101 |
enum { BUSY_FLAGS_PAGE_LOADING = 4U }; |
|---|
| 102 |
enum { LOAD_CMD_NORMAL = 1U }; |
|---|
| 103 |
enum { LOAD_CMD_RELOAD = 2U }; |
|---|
| 104 |
enum { LOAD_CMD_HISTORY = 4U }; |
|---|
| 105 |
|
|---|
| 106 |
nsresult GetBusyFlags(PRUint32 *aBusyFlags); |
|---|
| 107 |
nsresult GetLoadType(PRUint32 *aLoadType); |
|---|
| 108 |
nsresult SetLoadType(PRUint32 aLoadType); |
|---|
| 109 |
nsresult IsBeingDestroyed(PRBool *_retval); |
|---|
| 110 |
nsresult GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler); |
|---|
| 111 |
nsresult GetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState); |
|---|
| 112 |
nsresult SetLayoutHistoryState(nsILayoutHistoryState aLayoutHistoryState); |
|---|
| 113 |
nsresult GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState); |
|---|
| 114 |
nsresult GetSecurityUI(nsISecureBrowserUI *aSecurityUI); |
|---|
| 115 |
nsresult SetSecurityUI(nsISecureBrowserUI aSecurityUI); |
|---|
| 116 |
nsresult SuspendRefreshURIs(); |
|---|
| 117 |
nsresult ResumeRefreshURIs(); |
|---|
| 118 |
nsresult BeginRestore(nsIContentViewer viewer, PRBool top); |
|---|
| 119 |
nsresult FinishRestore(); |
|---|
| 120 |
nsresult GetRestoringDocument(PRBool *aRestoringDocument); |
|---|
| 121 |
nsresult GetUseErrorPages(PRBool *aUseErrorPages); |
|---|
| 122 |
nsresult SetUseErrorPages(PRBool aUseErrorPages); |
|---|
| 123 |
nsresult GetPreviousTransIndex(PRInt32 *aPreviousTransIndex); |
|---|
| 124 |
nsresult GetLoadedTransIndex(PRInt32 *aLoadedTransIndex); |
|---|
| 125 |
nsresult HistoryPurged(PRInt32 numEntries); |
|---|
| 126 |
} |
|---|
| 127 |
|
|---|
| 128 |
/****************************************************************************** |
|---|
| 129 |
|
|---|
| 130 |
******************************************************************************/ |
|---|
| 131 |
|
|---|
| 132 |
const char[] NS_IDOCSHELL_1_8_IID_STR = "9f0c7461-b9a4-47f6-b88c-421dce1bce66"; |
|---|
| 133 |
|
|---|
| 134 |
const nsIID NS_IDOCSHELL_1_8_IID= |
|---|
| 135 |
{ 0x9f0c7461, 0xb9a4, 0x47f6, |
|---|
| 136 |
[ 0xb8,0x8c,0x42,0x1d,0xce,0x1b,0xce,0x66 ] }; |
|---|
| 137 |
|
|---|
| 138 |
interface nsIDocShell_1_8 : nsIDocShell { |
|---|
| 139 |
|
|---|
| 140 |
static const char[] IID_STR = NS_IDOCSHELL_1_8_IID_STR; |
|---|
| 141 |
static const nsIID IID = NS_IDOCSHELL_1_8_IID; |
|---|
| 142 |
|
|---|
| 143 |
extern(System): |
|---|
| 144 |
nsresult GetSessionStorageForURI(nsIURI uri, nsIDOMStorage *_retval); |
|---|
| 145 |
nsresult AddSessionStorage(nsACString * aDomain, nsIDOMStorage storage); |
|---|
| 146 |
nsresult GetCurrentDocumentChannel(nsIChannel *aCurrentDocumentChannel); |
|---|
| 147 |
} |
|---|
| 148 |
|
|---|
| 149 |
/****************************************************************************** |
|---|
| 150 |
|
|---|
| 151 |
******************************************************************************/ |
|---|
| 152 |
|
|---|
| 153 |
const char[] NS_IDOCSHELL_1_9_IID_STR = "10ed386d-8598-408c-b571-e75ad18edeb0"; |
|---|
| 154 |
|
|---|
| 155 |
const nsIID NS_IDOCSHELL_1_9_IID = |
|---|
| 156 |
{0x10ed386d, 0x8598, 0x408c, [ 0xb5, 0x71, 0xe7, 0x5a, 0xd1, 0x8e, 0xde, 0xb0 ] }; |
|---|
| 157 |
|
|---|
| 158 |
interface nsIDocShell_1_9 : nsIDocShell_1_8 { |
|---|
| 159 |
|
|---|
| 160 |
static const char[] IID_STR = NS_IDOCSHELL_1_9_IID_STR; |
|---|
| 161 |
static const nsIID IID = NS_IDOCSHELL_1_9_IID; |
|---|
| 162 |
|
|---|
| 163 |
extern(System): |
|---|
| 164 |
nsresult GetSessionStorageForURI(nsIURI uri, nsIDOMStorage *_retval); |
|---|
| 165 |
nsresult AddSessionStorage(nsACString * aDomain, nsIDOMStorage storage); |
|---|
| 166 |
nsresult GetCurrentDocumentChannel(nsIChannel *aCurrentDocumentChannel); |
|---|
| 167 |
} |
|---|