|
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/. */ |
|
5 |
|
6 #ifndef WindowDbg_h__ |
|
7 #define WindowDbg_h__ |
|
8 |
|
9 /* |
|
10 * nsWindowDbg - Debug related utilities for nsWindow. |
|
11 */ |
|
12 |
|
13 #include "nsWindowDefs.h" |
|
14 |
|
15 // Enabled main event loop debug event output |
|
16 //#define EVENT_DEBUG_OUTPUT |
|
17 |
|
18 // Enables debug output for popup rollup hooks |
|
19 //#define POPUP_ROLLUP_DEBUG_OUTPUT |
|
20 |
|
21 // Enable window size and state debug output |
|
22 //#define WINSTATE_DEBUG_OUTPUT |
|
23 |
|
24 // nsIWidget defines a set of debug output statements |
|
25 // that are called in various places within the code. |
|
26 //#define WIDGET_DEBUG_OUTPUT |
|
27 |
|
28 // Enable IS_VK_DOWN debug output |
|
29 //#define DEBUG_VK |
|
30 |
|
31 // Main event loop debug output flags |
|
32 #if defined(EVENT_DEBUG_OUTPUT) |
|
33 #define SHOW_REPEAT_EVENTS true |
|
34 #define SHOW_MOUSEMOVE_EVENTS false |
|
35 #endif // defined(EVENT_DEBUG_OUTPUT) |
|
36 |
|
37 #if defined(POPUP_ROLLUP_DEBUG_OUTPUT) || defined(EVENT_DEBUG_OUTPUT) || 1 |
|
38 void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves); |
|
39 #endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT) || defined(EVENT_DEBUG_OUTPUT) |
|
40 |
|
41 #if defined(POPUP_ROLLUP_DEBUG_OUTPUT) |
|
42 typedef struct { |
|
43 char * mStr; |
|
44 int mId; |
|
45 } MSGFEventMsgInfo; |
|
46 |
|
47 #define DISPLAY_NMM_PRT(_arg) PR_LOG(gWindowsLog, PR_LOG_ALWAYS, ((_arg))); |
|
48 #else |
|
49 #define DISPLAY_NMM_PRT(_arg) |
|
50 #endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT) |
|
51 |
|
52 #if defined(DEBUG) |
|
53 void DDError(const char *msg, HRESULT hr); |
|
54 #endif // defined(DEBUG) |
|
55 |
|
56 #if defined(DEBUG_VK) |
|
57 bool is_vk_down(int vk); |
|
58 #define IS_VK_DOWN is_vk_down |
|
59 #else |
|
60 #define IS_VK_DOWN(a) (GetKeyState(a) < 0) |
|
61 #endif // defined(DEBUG_VK) |
|
62 |
|
63 #endif /* WindowDbg_h__ */ |