michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef WindowDbg_h__ michael@0: #define WindowDbg_h__ michael@0: michael@0: /* michael@0: * nsWindowDbg - Debug related utilities for nsWindow. michael@0: */ michael@0: michael@0: #include "nsWindowDefs.h" michael@0: michael@0: // Enabled main event loop debug event output michael@0: //#define EVENT_DEBUG_OUTPUT michael@0: michael@0: // Enables debug output for popup rollup hooks michael@0: //#define POPUP_ROLLUP_DEBUG_OUTPUT michael@0: michael@0: // Enable window size and state debug output michael@0: //#define WINSTATE_DEBUG_OUTPUT michael@0: michael@0: // nsIWidget defines a set of debug output statements michael@0: // that are called in various places within the code. michael@0: //#define WIDGET_DEBUG_OUTPUT michael@0: michael@0: // Enable IS_VK_DOWN debug output michael@0: //#define DEBUG_VK michael@0: michael@0: // Main event loop debug output flags michael@0: #if defined(EVENT_DEBUG_OUTPUT) michael@0: #define SHOW_REPEAT_EVENTS true michael@0: #define SHOW_MOUSEMOVE_EVENTS false michael@0: #endif // defined(EVENT_DEBUG_OUTPUT) michael@0: michael@0: #if defined(POPUP_ROLLUP_DEBUG_OUTPUT) || defined(EVENT_DEBUG_OUTPUT) || 1 michael@0: void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves); michael@0: #endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT) || defined(EVENT_DEBUG_OUTPUT) michael@0: michael@0: #if defined(POPUP_ROLLUP_DEBUG_OUTPUT) michael@0: typedef struct { michael@0: char * mStr; michael@0: int mId; michael@0: } MSGFEventMsgInfo; michael@0: michael@0: #define DISPLAY_NMM_PRT(_arg) PR_LOG(gWindowsLog, PR_LOG_ALWAYS, ((_arg))); michael@0: #else michael@0: #define DISPLAY_NMM_PRT(_arg) michael@0: #endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT) michael@0: michael@0: #if defined(DEBUG) michael@0: void DDError(const char *msg, HRESULT hr); michael@0: #endif // defined(DEBUG) michael@0: michael@0: #if defined(DEBUG_VK) michael@0: bool is_vk_down(int vk); michael@0: #define IS_VK_DOWN is_vk_down michael@0: #else michael@0: #define IS_VK_DOWN(a) (GetKeyState(a) < 0) michael@0: #endif // defined(DEBUG_VK) michael@0: michael@0: #endif /* WindowDbg_h__ */