Bug 1829659 - Remove `import.py` because it's not used anymore r=glandium,bwc
[gecko.git] / widget / windows / nsdefs.h
blobebf7892fdaa56b1c6181cadd46bd50f0c3f09a4a
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef NSDEFS_H
7 #define NSDEFS_H
9 #include <windows.h>
11 #ifdef _DEBUG
12 # define BREAK_TO_DEBUGGER DebugBreak()
13 #else
14 # define BREAK_TO_DEBUGGER
15 #endif
17 #ifdef _DEBUG
18 # define VERIFY(exp) \
19 if (!(exp)) { \
20 GetLastError(); \
21 BREAK_TO_DEBUGGER; \
23 #else // !_DEBUG
24 # define VERIFY(exp) (exp)
25 #endif // !_DEBUG
27 // inttypes.h-like macro for LONG_PTR/LPARAM formatting.
28 #ifdef HAVE_64BIT_BUILD
29 # define PRIdLPTR "lld"
30 # define PRIxLPTR "llx"
31 # define PRIXLPTR "llX"
32 #else
33 # define PRIdLPTR "ld"
34 # define PRIxLPTR "lx"
35 # define PRIXLPTR "lX"
36 #endif
38 // Win32 logging modules:
39 // nsWindow, nsSound, and nsClipboard
41 // Logging can be changed at runtime without recompiling in the General
42 // property page of Visual Studio under the "Environment" property.
44 // Two variables are of importance to be set:
45 // MOZ_LOG and MOZ_LOG_FILE
47 // MOZ_LOG:
48 // MOZ_LOG=all:5 (To log everything completely)
49 // MOZ_LOG=nsWindow:5,nsSound:5,nsClipboard:5
50 // (To log windows widget stuff)
51 // MOZ_LOG= (To turn off logging)
53 // MOZ_LOG_FILE:
54 // MOZ_LOG_FILE=C:\log.txt (To a file on disk)
55 // MOZ_LOG_FILE=WinDebug (To the debug window)
56 // MOZ_LOG_FILE= (To stdout/stderr)
58 #endif // NSDEFS_H