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/. */
10 * nsWindowDbg - Debug related utilities for nsWindow.
13 #include "nsWindowDefs.h"
15 // Enables debug output for popup rollup hooks
16 //#define POPUP_ROLLUP_DEBUG_OUTPUT
18 // Enable window size and state debug output
19 //#define WINSTATE_DEBUG_OUTPUT
21 // nsIWidget defines a set of debug output statements
22 // that are called in various places within the code.
23 //#define WIDGET_DEBUG_OUTPUT
25 // Enable IS_VK_DOWN debug output
28 // Main event loop debug output flags
29 #define SHOW_REPEAT_EVENTS true
30 #define SHOW_MOUSEMOVE_EVENTS false
32 void PrintEvent(UINT msg
, uint64_t wParam
, uint64_t lParam
, uint64_t retValue
,
33 bool result
, bool aShowAllEvents
, bool aShowMouseMoves
);
35 #if defined(POPUP_ROLLUP_DEBUG_OUTPUT)
41 # define DISPLAY_NMM_PRT(_arg) \
42 MOZ_LOG(gWindowsLog, mozilla::LogLevel::Info, ((_arg)));
44 # define DISPLAY_NMM_PRT(_arg)
45 #endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT)
48 void DDError(const char* msg
, HRESULT hr
);
49 #endif // defined(DEBUG)
52 bool is_vk_down(int vk
);
53 # define IS_VK_DOWN is_vk_down
55 # define IS_VK_DOWN(a) (GetKeyState(a) < 0)
56 #endif // defined(DEBUG_VK)
58 #endif /* WindowDbg_h__ */