VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/python/xpcom_consts.py

Last change on this file was 11746, checked in by vboxsync, 16 years ago

export python lib to OSE

  • Property svn:eol-style set to native
File size: 9.4 KB
Line 
1# ***** BEGIN LICENSE BLOCK *****
2# Version: MPL 1.1/GPL 2.0/LGPL 2.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 the Python XPCOM language bindings.
15#
16# The Initial Developer of the Original Code is
17# ActiveState Tool Corp.
18# Portions created by the Initial Developer are Copyright (C) 2000, 2001
19# the Initial Developer. All Rights Reserved.
20#
21# Contributor(s):
22# Mark Hammond <mhammond@skippinet.com.au> (original author)
23#
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.
35#
36# ***** END LICENSE BLOCK *****
37
38# Could maybe later have a process that extracted these enums should they change.
39# from nsFileLocations.h
40App_DirectoryBase = 0x00010000
41App_PrefsDirectory30 = App_DirectoryBase + 1
42App_PrefsDirectory40 = App_DirectoryBase + 2
43App_PrefsDirectory50 = App_DirectoryBase + 3
44App_ResDirectory = App_DirectoryBase + 5
45App_UserProfileDirectory30 = App_DirectoryBase + 10
46App_UserProfileDirectory40 = App_DirectoryBase + 11
47App_UserProfileDirectory50 = App_DirectoryBase + 12
48App_DefaultUserProfileRoot30 = App_DirectoryBase + 13
49App_DefaultUserProfileRoot40 = App_DirectoryBase + 14
50App_DefaultUserProfileRoot50 = App_DirectoryBase + 15
51App_ProfileDefaultsFolder30 = App_DirectoryBase + 16
52App_ProfileDefaultsFolder40 = App_DirectoryBase + 17
53App_ProfileDefaultsFolder50 = App_DirectoryBase + 18
54App_PrefDefaultsFolder50 = App_DirectoryBase + 19
55App_DefaultsFolder50 = App_DirectoryBase + 25
56App_ComponentsDirectory = App_DirectoryBase + 30
57App_ChromeDirectory = App_DirectoryBase + 31
58App_PluginsDirectory = App_DirectoryBase + 32
59App_UserChromeDirectory = App_DirectoryBase + 40
60App_FileBase = App_DirectoryBase + 1000
61App_PreferencesFile30 = App_FileBase + 1
62App_PreferencesFile40 = App_FileBase + 2
63App_PreferencesFile50 = App_FileBase + 3
64App_BookmarksFile30 = App_FileBase + 10
65App_BookmarksFile40 = App_FileBase + 11
66App_BookmarksFile50 = App_FileBase + 12
67App_Registry40 = App_FileBase + 20
68App_Registry50 = App_FileBase + 21
69App_LocalStore50 = App_FileBase + 30
70App_History50 = App_FileBase + 40
71App_MailDirectory50 = App_FileBase + 50
72App_ImapMailDirectory50 = App_FileBase + 60
73App_NewsDirectory50 = App_FileBase + 70
74App_MessengerFolderCache50 = App_FileBase + 80
75App_UsersPanels50 = App_FileBase + 90
76App_SearchFile50 = App_FileBase + 100
77App_SearchDirectory50 = App_FileBase + 101
78
79# From nsSpecialSystemDirectory.h
80OS_DriveDirectory = 1
81OS_TemporaryDirectory = 2
82OS_CurrentProcessDirectory= 3
83OS_CurrentWorkingDirectory= 4
84
85XPCOM_CurrentProcessComponentDirectory= 5
86XPCOM_CurrentProcessComponentRegistry= 6
87
88Moz_BinDirectory = 10
89
90Mac_SystemDirectory = 101
91Mac_DesktopDirectory = 102
92Mac_TrashDirectory = 103
93Mac_StartupDirectory = 104
94Mac_ShutdownDirectory = 105
95Mac_AppleMenuDirectory = 106
96Mac_ControlPanelDirectory = 107
97Mac_ExtensionDirectory = 108
98Mac_FontsDirectory = 109
99Mac_PreferencesDirectory = 110
100Mac_DocumentsDirectory = 111
101Mac_InternetSearchDirectory = 112
102
103Win_SystemDirectory = 201
104Win_WindowsDirectory = 202
105
106Win_HomeDirectory = 203
107Win_Desktop = 204
108Win_Programs = 205
109Win_Controls = 206
110Win_Printers = 207
111Win_Personal = 208
112Win_Favorites = 209
113Win_Startup = 210
114Win_Recent = 211
115Win_Sendto = 212
116Win_Bitbucket = 213
117Win_Startmenu = 214
118Win_Desktopdirectory = 215
119Win_Drives = 216
120Win_Network = 217
121Win_Nethood = 218
122Win_Fonts = 219
123Win_Templates = 220
124Win_Common_Startmenu = 221
125Win_Common_Programs = 222
126Win_Common_Startup = 223
127Win_Common_Desktopdirectory = 224
128Win_Appdata = 225
129Win_Printhood = 226
130
131Unix_LocalDirectory = 301
132Unix_LibDirectory = 302
133Unix_HomeDirectory = 303
134
135BeOS_SettingsDirectory = 401
136BeOS_HomeDirectory = 402
137BeOS_DesktopDirectory = 403
138BeOS_SystemDirectory = 404
139
140OS2_SystemDirectory = 501
141
142# Type/Variant related constants.
143TD_INT8 = 0
144TD_INT16 = 1
145TD_INT32 = 2
146TD_INT64 = 3
147TD_UINT8 = 4
148TD_UINT16 = 5
149TD_UINT32 = 6
150TD_UINT64 = 7
151TD_FLOAT = 8
152TD_DOUBLE = 9
153TD_BOOL = 10
154TD_CHAR = 11
155TD_WCHAR = 12
156TD_VOID = 13
157TD_PNSIID = 14
158TD_DOMSTRING = 15
159TD_PSTRING = 16
160TD_PWSTRING = 17
161TD_INTERFACE_TYPE = 18
162TD_INTERFACE_IS_TYPE = 19
163TD_ARRAY = 20
164TD_PSTRING_SIZE_IS = 21
165TD_PWSTRING_SIZE_IS = 22
166TD_UTF8STRING = 23
167TD_CSTRING = 24
168TD_ASTRING = 25
169
170# From xpt_struct.h
171XPT_TDP_POINTER = 0x80
172XPT_TDP_UNIQUE_POINTER = 0x40
173XPT_TDP_REFERENCE = 0x20
174XPT_TDP_FLAGMASK = 0xe0
175XPT_TDP_TAGMASK = (~XPT_TDP_FLAGMASK)
176def XPT_TDP_TAG(tdp): return (tdp & XPT_TDP_TAGMASK)
177
178def XPT_TDP_IS_POINTER(flags): return (flags & XPT_TDP_POINTER)
179def XPT_TDP_IS_UNIQUE_POINTER(flags): return (flags & XPT_TDP_UNIQUE_POINTER)
180def XPT_TDP_IS_REFERENCE(flags): return (flags & XPT_TDP_REFERENCE)
181
182XPT_ID_SCRIPTABLE = 0x80
183XPT_ID_FLAGMASK = 0x80
184XPT_ID_TAGMASK = ~XPT_ID_FLAGMASK
185def XPT_ID_TAG(id): return id & XPT_ID_TAGMASK
186
187def XPT_ID_IS_SCRIPTABLE(flags): return flags & XPT_ID_SCRIPTABLE
188
189XPT_PD_IN = 0x80
190XPT_PD_OUT = 0x40
191XPT_PD_RETVAL = 0x20
192XPT_PD_SHARED = 0x10
193XPT_PD_DIPPER = 0x08
194XPT_PD_FLAGMASK = 0xf0
195
196def XPT_PD_IS_IN(flags): return (flags & XPT_PD_IN)
197def XPT_PD_IS_OUT(flags): return (flags & XPT_PD_OUT)
198def XPT_PD_IS_RETVAL(flags): return (flags & XPT_PD_RETVAL)
199def XPT_PD_IS_SHARED(flags): return (flags & XPT_PD_SHARED)
200def XPT_PD_IS_DIPPER(flags): return (flags & XPT_PD_DIPPER)
201
202XPT_MD_GETTER = 0x80
203XPT_MD_SETTER = 0x40
204XPT_MD_NOTXPCOM = 0x20
205XPT_MD_CTOR = 0x10
206XPT_MD_HIDDEN = 0x08
207XPT_MD_FLAGMASK = 0xf8
208
209def XPT_MD_IS_GETTER(flags): return (flags & XPT_MD_GETTER)
210def XPT_MD_IS_SETTER(flags): return (flags & XPT_MD_SETTER)
211def XPT_MD_IS_NOTXPCOM(flags): return (flags & XPT_MD_NOTXPCOM)
212def XPT_MD_IS_CTOR(flags): return (flags & XPT_MD_CTOR)
213def XPT_MD_IS_HIDDEN(flags): return (flags & XPT_MD_HIDDEN)
214
215# From xptinfo.h
216
217T_I8 = TD_INT8
218T_I16 = TD_INT16
219T_I32 = TD_INT32
220T_I64 = TD_INT64
221T_U8 = TD_UINT8
222T_U16 = TD_UINT16
223T_U32 = TD_UINT32
224T_U64 = TD_UINT64
225T_FLOAT = TD_FLOAT
226T_DOUBLE = TD_DOUBLE
227T_BOOL = TD_BOOL
228T_CHAR = TD_CHAR
229T_WCHAR = TD_WCHAR
230T_VOID = TD_VOID
231T_IID = TD_PNSIID
232T_DOMSTRING = TD_DOMSTRING
233T_CHAR_STR = TD_PSTRING
234T_WCHAR_STR = TD_PWSTRING
235T_INTERFACE = TD_INTERFACE_TYPE
236T_INTERFACE_IS = TD_INTERFACE_IS_TYPE
237T_ARRAY = TD_ARRAY
238T_PSTRING_SIZE_IS = TD_PSTRING_SIZE_IS
239T_PWSTRING_SIZE_IS = TD_PWSTRING_SIZE_IS
240T_UTF8STRING = TD_UTF8STRING
241T_CSTRING = TD_CSTRING
242T_ASTRING = TD_ASTRING
243
244# from nsIVariant
245VTYPE_INT8 = 0
246VTYPE_INT16 = 1
247VTYPE_INT32 = 2
248VTYPE_INT64 = 3
249VTYPE_UINT8 = 4
250VTYPE_UINT16 = 5
251VTYPE_UINT32 = 6
252VTYPE_UINT64 = 7
253VTYPE_FLOAT = 8
254VTYPE_DOUBLE = 9
255VTYPE_BOOL = 10
256VTYPE_CHAR = 11
257VTYPE_WCHAR = 12
258VTYPE_VOID = 13
259VTYPE_ID = 14
260VTYPE_DOMSTRING = 15
261VTYPE_CHAR_STR = 16
262VTYPE_WCHAR_STR = 17
263VTYPE_INTERFACE = 18
264VTYPE_INTERFACE_IS = 19
265VTYPE_ARRAY = 20
266VTYPE_STRING_SIZE_IS = 21
267VTYPE_WSTRING_SIZE_IS = 22
268VTYPE_UTF8STRING = 23
269VTYPE_CSTRING = 24
270VTYPE_ASTRING = 25
271VTYPE_EMPTY_ARRAY = 254
272VTYPE_EMPTY = 255
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use