2009-06-29 12:36:16 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-06-29 12:36:16 -07:00
|
|
|
|
|
|
|
#ifndef WindowDbg_h__
|
|
|
|
#define WindowDbg_h__
|
|
|
|
|
2009-06-29 23:00:16 -07:00
|
|
|
/*
|
|
|
|
* nsWindowDbg - Debug related utilities for nsWindow.
|
|
|
|
*/
|
|
|
|
|
2009-06-29 12:36:16 -07:00
|
|
|
#include "nsWindowDefs.h"
|
|
|
|
|
|
|
|
// Enabled main event loop debug event output
|
|
|
|
//#define EVENT_DEBUG_OUTPUT
|
|
|
|
|
|
|
|
// Enables debug output for popup rollup hooks
|
|
|
|
//#define POPUP_ROLLUP_DEBUG_OUTPUT
|
|
|
|
|
2009-11-10 08:24:10 -08:00
|
|
|
// Enable window size and state debug output
|
|
|
|
//#define WINSTATE_DEBUG_OUTPUT
|
|
|
|
|
2009-06-29 12:36:16 -07:00
|
|
|
// nsIWidget defines a set of debug output statements
|
|
|
|
// that are called in various places within the code.
|
|
|
|
//#define WIDGET_DEBUG_OUTPUT
|
|
|
|
|
|
|
|
// Enable IS_VK_DOWN debug output
|
|
|
|
//#define DEBUG_VK
|
|
|
|
|
|
|
|
// Main event loop debug output flags
|
|
|
|
#if defined(EVENT_DEBUG_OUTPUT)
|
2011-10-01 19:16:19 -07:00
|
|
|
#define SHOW_REPEAT_EVENTS true
|
|
|
|
#define SHOW_MOUSEMOVE_EVENTS false
|
2009-06-29 12:36:16 -07:00
|
|
|
#endif // defined(EVENT_DEBUG_OUTPUT)
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves);
|
2009-06-29 12:36:16 -07:00
|
|
|
|
|
|
|
#if defined(POPUP_ROLLUP_DEBUG_OUTPUT)
|
|
|
|
typedef struct {
|
|
|
|
char * mStr;
|
|
|
|
int mId;
|
|
|
|
} MSGFEventMsgInfo;
|
|
|
|
|
2015-06-03 15:25:57 -07:00
|
|
|
#define DISPLAY_NMM_PRT(_arg) MOZ_LOG(gWindowsLog, mozilla::LogLevel::Info, ((_arg)));
|
2009-06-29 12:36:16 -07:00
|
|
|
#else
|
|
|
|
#define DISPLAY_NMM_PRT(_arg)
|
|
|
|
#endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT)
|
|
|
|
|
|
|
|
#if defined(DEBUG)
|
|
|
|
void DDError(const char *msg, HRESULT hr);
|
|
|
|
#endif // defined(DEBUG)
|
|
|
|
|
|
|
|
#if defined(DEBUG_VK)
|
2011-09-28 23:19:26 -07:00
|
|
|
bool is_vk_down(int vk);
|
2009-06-29 12:36:16 -07:00
|
|
|
#define IS_VK_DOWN is_vk_down
|
|
|
|
#else
|
|
|
|
#define IS_VK_DOWN(a) (GetKeyState(a) < 0)
|
|
|
|
#endif // defined(DEBUG_VK)
|
|
|
|
|
2010-08-29 18:21:12 -07:00
|
|
|
#endif /* WindowDbg_h__ */
|