widget/windows/nsWindowDbg.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/windows/nsWindowDbg.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef WindowDbg_h__
    1.10 +#define WindowDbg_h__
    1.11 +
    1.12 +/*
    1.13 + * nsWindowDbg - Debug related utilities for nsWindow.
    1.14 + */
    1.15 +
    1.16 +#include "nsWindowDefs.h"
    1.17 +
    1.18 +// Enabled main event loop debug event output
    1.19 +//#define EVENT_DEBUG_OUTPUT
    1.20 +
    1.21 +// Enables debug output for popup rollup hooks
    1.22 +//#define POPUP_ROLLUP_DEBUG_OUTPUT
    1.23 +
    1.24 +// Enable window size and state debug output
    1.25 +//#define WINSTATE_DEBUG_OUTPUT
    1.26 +
    1.27 +// nsIWidget defines a set of debug output statements
    1.28 +// that are called in various places within the code.
    1.29 +//#define WIDGET_DEBUG_OUTPUT
    1.30 +
    1.31 +// Enable IS_VK_DOWN debug output
    1.32 +//#define DEBUG_VK
    1.33 +
    1.34 +// Main event loop debug output flags
    1.35 +#if defined(EVENT_DEBUG_OUTPUT)
    1.36 +#define SHOW_REPEAT_EVENTS      true
    1.37 +#define SHOW_MOUSEMOVE_EVENTS   false
    1.38 +#endif // defined(EVENT_DEBUG_OUTPUT)
    1.39 +
    1.40 +#if defined(POPUP_ROLLUP_DEBUG_OUTPUT) || defined(EVENT_DEBUG_OUTPUT) || 1
    1.41 +void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves);
    1.42 +#endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT) || defined(EVENT_DEBUG_OUTPUT)
    1.43 +
    1.44 +#if defined(POPUP_ROLLUP_DEBUG_OUTPUT)
    1.45 +typedef struct {
    1.46 +  char * mStr;
    1.47 +  int    mId;
    1.48 +} MSGFEventMsgInfo;
    1.49 +
    1.50 +#define DISPLAY_NMM_PRT(_arg) PR_LOG(gWindowsLog, PR_LOG_ALWAYS, ((_arg)));
    1.51 +#else
    1.52 +#define DISPLAY_NMM_PRT(_arg)
    1.53 +#endif // defined(POPUP_ROLLUP_DEBUG_OUTPUT)
    1.54 +
    1.55 +#if defined(DEBUG)
    1.56 +void DDError(const char *msg, HRESULT hr);
    1.57 +#endif // defined(DEBUG)
    1.58 +
    1.59 +#if defined(DEBUG_VK)
    1.60 +bool is_vk_down(int vk);
    1.61 +#define IS_VK_DOWN is_vk_down
    1.62 +#else
    1.63 +#define IS_VK_DOWN(a) (GetKeyState(a) < 0)
    1.64 +#endif // defined(DEBUG_VK)
    1.65 +
    1.66 +#endif /* WindowDbg_h__ */

mercurial