comparison dwt/internal/mozilla/nsIWebBrowserChrome.d @ 125:5583f8eeee6c

Synced mozilla with dwt-linux
author Jacob Carlborg <doob@me.com>
date Fri, 16 Jan 2009 12:49:08 +0100
parents d8635bb48c7c
children
comparison
equal deleted inserted replaced
124:540fa4e9974a 125:5583f8eeee6c
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1
3 *
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
13 *
14 * The Original Code is Mozilla Communicator client code, released March 31, 1998.
15 *
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by Netscape are Copyright (C) 1998-1999
19 * Netscape Communications Corporation. All Rights Reserved.
20 *
21 * Contributor(s):
22 *
23 * IBM
24 * - Binding to permit interfacing between Mozilla and DWT
25 * - Copyright (C) 2003, 2008 IBM Corp. All Rights Reserved.
26 *
27 * ***** END LICENSE BLOCK ***** */
28 module dwt.internal.mozilla.nsIWebBrowserChrome; 1 module dwt.internal.mozilla.nsIWebBrowserChrome;
29 2
30 import dwt.dwthelper.utils; 3 import dwt.internal.mozilla.Common;
4 import dwt.internal.mozilla.nsID;
5 import dwt.internal.mozilla.nsISupports;
31 6
32 public class nsIWebBrowserChrome extends nsISupports { 7 import dwt.internal.mozilla.nsIWebBrowser;
33 8
34 static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 10; 9 const char[] NS_IWEBBROWSERCHROME_IID_STR = "ba434c60-9d52-11d3-afb0-00a024ffc08c";
35 10
36 public static final String NS_IWEBBROWSERCHROME_IID_STR = 11 const nsIID NS_IWEBBROWSERCHROME_IID=
37 "ba434c60-9d52-11d3-afb0-00a024ffc08c"; 12 {0xba434c60, 0x9d52, 0x11d3,
13 [ 0xaf, 0xb0, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]};
38 14
39 public static final nsID NS_IWEBBROWSERCHROME_IID = 15 interface nsIWebBrowserChrome : nsISupports {
40 new nsID(NS_IWEBBROWSERCHROME_IID_STR);
41 16
42 public nsIWebBrowserChrome(int /*long*/ address) { 17 static const char[] IID_STR = NS_IWEBBROWSERCHROME_IID_STR;
43 super(address); 18 static const nsIID IID = NS_IWEBBROWSERCHROME_IID;
44 }
45 19
46 public static final int STATUS_SCRIPT = 1; 20 extern(System):
21 enum { STATUS_SCRIPT = 1U };
22 enum { STATUS_SCRIPT_DEFAULT = 2U };
23 enum { STATUS_LINK = 3U };
47 24
48 public static final int STATUS_SCRIPT_DEFAULT = 2; 25 nsresult SetStatus(PRUint32 statusType, PRUnichar *status);
26 nsresult GetWebBrowser(nsIWebBrowser *aWebBrowser);
27 nsresult SetWebBrowser(nsIWebBrowser aWebBrowser);
49 28
50 public static final int STATUS_LINK = 3; 29 enum { CHROME_DEFAULT = 1U };
30 enum { CHROME_WINDOW_BORDERS = 2U };
31 enum { CHROME_WINDOW_CLOSE = 4U };
32 enum { CHROME_WINDOW_RESIZE = 8U };
33 enum { CHROME_MENUBAR = 16U };
34 enum { CHROME_TOOLBAR = 32U };
35 enum { CHROME_LOCATIONBAR = 64U };
36 enum { CHROME_STATUSBAR = 128U };
37 enum { CHROME_PERSONAL_TOOLBAR = 256U };
38 enum { CHROME_SCROLLBARS = 512U };
39 enum { CHROME_TITLEBAR = 1024U };
40 enum { CHROME_EXTRA = 2048U };
41 enum { CHROME_WITH_SIZE = 4096U };
42 enum { CHROME_WITH_POSITION = 8192U };
43 enum { CHROME_WINDOW_MIN = 16384U };
44 enum { CHROME_WINDOW_POPUP = 32768U };
45 enum { CHROME_WINDOW_RAISED = 33554432U };
46 enum { CHROME_WINDOW_LOWERED = 67108864U };
47 enum { CHROME_CENTER_SCREEN = 134217728U };
48 enum { CHROME_DEPENDENT = 268435456U };
49 enum { CHROME_MODAL = 536870912U };
50 enum { CHROME_OPENAS_DIALOG = 1073741824U };
51 enum { CHROME_OPENAS_CHROME = 2147483648U };
52 enum { CHROME_ALL = 4094U };
51 53
52 public int SetStatus(int statusType, char[] status) { 54 nsresult GetChromeFlags(PRUint32 *aChromeFlags);
53 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), statusType, status); 55 nsresult SetChromeFlags(PRUint32 aChromeFlags);
54 } 56 nsresult DestroyBrowserWindow();
57 nsresult SizeBrowserTo(PRInt32 aCX, PRInt32 aCY);
58 nsresult ShowAsModal();
59 nsresult IsWindowModal(PRBool *_retval);
60 nsresult ExitModalEventLoop(nsresult aStatus);
55 61
56 public int GetWebBrowser(int /*long*/[] aWebBrowser) { 62 }
57 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aWebBrowser);
58 }
59 63
60 public int SetWebBrowser(int /*long*/ aWebBrowser) {
61 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aWebBrowser);
62 }
63
64 public static final int CHROME_DEFAULT = 1;
65
66 public static final int CHROME_WINDOW_BORDERS = 2;
67
68 public static final int CHROME_WINDOW_CLOSE = 4;
69
70 public static final int CHROME_WINDOW_RESIZE = 8;
71
72 public static final int CHROME_MENUBAR = 16;
73
74 public static final int CHROME_TOOLBAR = 32;
75
76 public static final int CHROME_LOCATIONBAR = 64;
77
78 public static final int CHROME_STATUSBAR = 128;
79
80 public static final int CHROME_PERSONAL_TOOLBAR = 256;
81
82 public static final int CHROME_SCROLLBARS = 512;
83
84 public static final int CHROME_TITLEBAR = 1024;
85
86 public static final int CHROME_EXTRA = 2048;
87
88 public static final int CHROME_WITH_SIZE = 4096;
89
90 public static final int CHROME_WITH_POSITION = 8192;
91
92 public static final int CHROME_WINDOW_MIN = 16384;
93
94 public static final int CHROME_WINDOW_POPUP = 32768;
95
96 public static final int CHROME_WINDOW_RAISED = 33554432;
97
98 public static final int CHROME_WINDOW_LOWERED = 67108864;
99
100 public static final int CHROME_CENTER_SCREEN = 134217728;
101
102 public static final int CHROME_DEPENDENT = 268435456;
103
104 public static final int CHROME_MODAL = 536870912;
105
106 public static final int CHROME_OPENAS_DIALOG = 1073741824;
107
108 public static final int CHROME_OPENAS_CHROME = -2147483648;
109
110 public static final int CHROME_ALL = 4094;
111
112 public int GetChromeFlags(int[] aChromeFlags) {
113 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aChromeFlags);
114 }
115
116 public int SetChromeFlags(int aChromeFlags) {
117 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aChromeFlags);
118 }
119
120 public int DestroyBrowserWindow() {
121 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress());
122 }
123
124 public int SizeBrowserTo(int aCX, int aCY) {
125 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aCX, aCY);
126 }
127
128 public int ShowAsModal() {
129 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress());
130 }
131
132 public int IsWindowModal(int[] _retval) {
133 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), _retval);
134 }
135
136 public int ExitModalEventLoop(int aStatus) {
137 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aStatus);
138 }
139 }