1/*
2 * tkMacOSXDebug.h --
3 *
4 *	Declarations of Macintosh specific functions for debugging MacOS events,
5 *	regions, etc...
6 *
7 * Copyright 2001-2009, Apple Inc.
8 * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
9 *
10 * See the file "license.terms" for information on usage and redistribution
11 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 *
13 * RCS: @(#) $Id$
14 */
15
16#ifndef _TKMACDEBUG
17#define _TKMACDEBUG
18
19#ifndef _TKMACINT
20#include "tkMacOSXInt.h"
21#endif
22
23#ifdef TK_MAC_DEBUG
24
25MODULE_SCOPE void* TkMacOSXGetNamedDebugSymbol(const char* module, const char* symbol);
26
27/* Macro to abstract common use of TkMacOSXGetNamedDebugSymbol to initialize named symbols */
28#define TkMacOSXInitNamedDebugSymbol(module, ret, symbol, ...) \
29    static ret (* symbol)(__VA_ARGS__) = (void*)(-1L); \
30    if (symbol == (void*)(-1L)) { \
31	symbol = TkMacOSXGetNamedDebugSymbol(STRINGIFY(module), STRINGIFY(_##symbol));\
32    }
33
34#endif /* TK_MAC_DEBUG */
35
36#endif
37