Fix constructor method (foo.bar/foo[baz] initialized from a lambda) invocation to...
[mozilla-central.git] / widget / public / nsWidgetInitData.h
blob9fa686479e17a07477829d917a3828b835795c8a
1 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #ifndef nsWidgetInitData_h__
39 #define nsWidgetInitData_h__
41 #include "prtypes.h"
43 /**
44 * Window types
46 * Don't alter previously encoded enum values - 3rd party apps may look at
47 * these.
49 enum nsWindowType {
50 eWindowType_toplevel, // default top level window
51 eWindowType_dialog, // top level window but usually handled differently
52 // by the OS
53 eWindowType_popup, // used for combo boxes, etc
54 eWindowType_child, // child windows (contained inside a window on the
55 // desktop (has no border))
56 eWindowType_invisible, // windows that are invisible or offscreen
57 eWindowType_plugin, // plugin window
58 eWindowType_java, // java plugin window
59 eWindowType_sheet // MacOSX sheet (special dialog class)
62 /**
63 * Popup types
65 * For eWindowType_popup
67 enum nsPopupType {
68 ePopupTypePanel,
69 ePopupTypeMenu,
70 ePopupTypeTooltip,
71 ePopupTypeAny = 0xF000 // used only to pass to
72 // nsXULPopupManager::GetTopPopup
75 /**
76 * Border styles
78 enum nsBorderStyle {
79 eBorderStyle_none = 0, // no border, titlebar, etc.. opposite of
80 // all
81 eBorderStyle_all = 1 << 0, // all window decorations
82 eBorderStyle_border = 1 << 1, // enables the border on the window. these
83 // are only for decoration and are not
84 // resize handles
85 eBorderStyle_resizeh = 1 << 2, // enables the resize handles for the
86 // window. if this is set, border is
87 // implied to also be set
88 eBorderStyle_title = 1 << 3, // enables the titlebar for the window
89 eBorderStyle_menu = 1 << 4, // enables the window menu button on the
90 // title bar. this being on should force
91 // the title bar to display
92 eBorderStyle_minimize = 1 << 5, // enables the minimize button so the user
93 // can minimize the window. turned off for
94 // tranient windows since they can not be
95 // minimized separate from their parent
96 eBorderStyle_maximize = 1 << 6, // enables the maxmize button so the user
97 // can maximize the window
98 eBorderStyle_close = 1 << 7, // show the close button
99 eBorderStyle_default = -1 // whatever the OS wants... i.e. don't do
100 // anything
104 * Content types
106 * Exposed so screen readers know what's UI
108 enum nsContentType {
109 eContentTypeInherit = -1,
110 eContentTypeUI = 0,
111 eContentTypeContent = 1,
112 eContentTypeContentFrame = 2
116 * Basic struct for widget initialization data.
117 * @see Create member function of nsIWidget
120 struct nsWidgetInitData {
121 nsWidgetInitData() :
122 mWindowType(eWindowType_child),
123 mBorderStyle(eBorderStyle_default),
124 mContentType(eContentTypeInherit),
125 mPopupHint(ePopupTypePanel),
126 clipChildren(PR_FALSE),
127 clipSiblings(PR_FALSE),
128 mDropShadow(PR_FALSE),
129 mListenForResizes(PR_FALSE),
130 mUnicode(PR_TRUE)
134 nsWindowType mWindowType;
135 nsBorderStyle mBorderStyle;
136 nsContentType mContentType; // Exposed so screen readers know what's UI
137 nsPopupType mPopupHint;
138 // when painting exclude area occupied by child windows and sibling windows
139 PRPackedBool clipChildren, clipSiblings, mDropShadow;
140 PRPackedBool mListenForResizes;
141 PRPackedBool mUnicode;
144 #endif // nsWidgetInitData_h__