Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef WindowDbg_h__ |
michael@0 | 7 | #define WindowDbg_h__ |
michael@0 | 8 | |
michael@0 | 9 | /* |
michael@0 | 10 | * nsWindowDbg - Debug related utilities for nsWindow. |
michael@0 | 11 | */ |
michael@0 | 12 | |
michael@0 | 13 | #include "nsWindowDefs.h" |
michael@0 | 14 | |
michael@0 | 15 | // Enabled main event loop debug event output |
michael@0 | 16 | //#define EVENT_DEBUG_OUTPUT |
michael@0 | 17 | |
michael@0 | 18 | // Enables debug output for popup rollup hooks |
michael@0 | 19 | //#define POPUP_ROLLUP_DEBUG_OUTPUT |
michael@0 | 20 | |
michael@0 | 21 | // Enable window size and state debug output |
michael@0 | 22 | //#define WINSTATE_DEBUG_OUTPUT |
michael@0 | 23 | |
michael@0 | 24 | // nsIWidget defines a set of debug output statements |
michael@0 | 25 | // that are called in various places within the code. |
michael@0 | 26 | //#define WIDGET_DEBUG_OUTPUT |
michael@0 | 27 | |
michael@0 | 28 | // Enable IS_VK_DOWN debug output |
michael@0 | 29 | //#define DEBUG_VK |
michael@0 | 30 | |
michael@0 | 31 | // Main event loop debug output flags |
michael@0 | 32 | #if defined(EVENT_DEBUG_OUTPUT) |
michael@0 | 33 | #define SHOW_REPEAT_EVENTS true |
michael@0 | 34 | #define SHOW_MOUSEMOVE_EVENTS false |
michael@0 | 35 | #endif // defined(EVENT_DEBUG_OUTPUT) |
michael@0 | 36 | |
michael@0 | 37 | #if defined(POPUP_ROLLUP_DEBUG_OUTPUT) || defined(EVENT_DEBUG_OUTPUT) || 1 |
michael@0 | 38 | void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves); |
michael@0 | 39 | #endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT) || defined(EVENT_DEBUG_OUTPUT) |
michael@0 | 40 | |
michael@0 | 41 | #if defined(POPUP_ROLLUP_DEBUG_OUTPUT) |
michael@0 | 42 | typedef struct { |
michael@0 | 43 | char * mStr; |
michael@0 | 44 | int mId; |
michael@0 | 45 | } MSGFEventMsgInfo; |
michael@0 | 46 | |
michael@0 | 47 | #define DISPLAY_NMM_PRT(_arg) PR_LOG(gWindowsLog, PR_LOG_ALWAYS, ((_arg))); |
michael@0 | 48 | #else |
michael@0 | 49 | #define DISPLAY_NMM_PRT(_arg) |
michael@0 | 50 | #endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT) |
michael@0 | 51 | |
michael@0 | 52 | #if defined(DEBUG) |
michael@0 | 53 | void DDError(const char *msg, HRESULT hr); |
michael@0 | 54 | #endif // defined(DEBUG) |
michael@0 | 55 | |
michael@0 | 56 | #if defined(DEBUG_VK) |
michael@0 | 57 | bool is_vk_down(int vk); |
michael@0 | 58 | #define IS_VK_DOWN is_vk_down |
michael@0 | 59 | #else |
michael@0 | 60 | #define IS_VK_DOWN(a) (GetKeyState(a) < 0) |
michael@0 | 61 | #endif // defined(DEBUG_VK) |
michael@0 | 62 | |
michael@0 | 63 | #endif /* WindowDbg_h__ */ |