Bug 1761003 [wpt PR 33324] - Add comment pointing to followup bug, and fix typos...
[gecko.git] / widget / windows / nsWindowDbg.h
blob11722644fbc7c6e1c53e20877a87a9852c5588df
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 WindowDbg_h__
7 #define WindowDbg_h__
9 /*
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
26 //#define DEBUG_VK
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)
36 typedef struct {
37 char* mStr;
38 int mId;
39 } MSGFEventMsgInfo;
41 # define DISPLAY_NMM_PRT(_arg) \
42 MOZ_LOG(gWindowsLog, mozilla::LogLevel::Info, ((_arg)));
43 #else
44 # define DISPLAY_NMM_PRT(_arg)
45 #endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT)
47 #if defined(DEBUG)
48 void DDError(const char* msg, HRESULT hr);
49 #endif // defined(DEBUG)
51 #if defined(DEBUG_VK)
52 bool is_vk_down(int vk);
53 # define IS_VK_DOWN is_vk_down
54 #else
55 # define IS_VK_DOWN(a) (GetKeyState(a) < 0)
56 #endif // defined(DEBUG_VK)
58 #endif /* WindowDbg_h__ */