gecko-dev/widget/windows/nsWindowDbg.h
Eric Rahm 75c4bebb79 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00

62 lines
1.6 KiB
C

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
#ifndef WindowDbg_h__
#define WindowDbg_h__
/*
* nsWindowDbg - Debug related utilities for nsWindow.
*/
#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
// Enable window size and state debug output
//#define WINSTATE_DEBUG_OUTPUT
// 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)
#define SHOW_REPEAT_EVENTS true
#define SHOW_MOUSEMOVE_EVENTS false
#endif // defined(EVENT_DEBUG_OUTPUT)
void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves);
#if defined(POPUP_ROLLUP_DEBUG_OUTPUT)
typedef struct {
char * mStr;
int mId;
} MSGFEventMsgInfo;
#define DISPLAY_NMM_PRT(_arg) MOZ_LOG(gWindowsLog, mozilla::LogLevel::Info, ((_arg)));
#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)
bool is_vk_down(int vk);
#define IS_VK_DOWN is_vk_down
#else
#define IS_VK_DOWN(a) (GetKeyState(a) < 0)
#endif // defined(DEBUG_VK)
#endif /* WindowDbg_h__ */