jpayne@69: /* jpayne@69: * tkMacOSXDebug.h -- jpayne@69: * jpayne@69: * Declarations of Macintosh specific functions for debugging MacOS events, jpayne@69: * regions, etc... jpayne@69: * jpayne@69: * Copyright 2001-2009, Apple Inc. jpayne@69: * Copyright (c) 2005-2009 Daniel A. Steffen jpayne@69: * jpayne@69: * See the file "license.terms" for information on usage and redistribution jpayne@69: * of this file, and for a DISCLAIMER OF ALL WARRANTIES. jpayne@69: */ jpayne@69: jpayne@69: #ifndef _TKMACDEBUG jpayne@69: #define _TKMACDEBUG jpayne@69: jpayne@69: #ifndef _TKMACINT jpayne@69: #include "tkMacOSXInt.h" jpayne@69: #endif jpayne@69: jpayne@69: #ifdef TK_MAC_DEBUG jpayne@69: jpayne@69: MODULE_SCOPE void* TkMacOSXGetNamedDebugSymbol(const char* module, const char* symbol); jpayne@69: jpayne@69: /* Macro to abstract common use of TkMacOSXGetNamedDebugSymbol to initialize named symbols */ jpayne@69: #define TkMacOSXInitNamedDebugSymbol(module, ret, symbol, ...) \ jpayne@69: static ret (* symbol)(__VA_ARGS__) = (void*)(-1L); \ jpayne@69: if (symbol == (void*)(-1L)) { \ jpayne@69: symbol = TkMacOSXGetNamedDebugSymbol(STRINGIFY(module), STRINGIFY(_##symbol));\ jpayne@69: } jpayne@69: jpayne@69: #endif /* TK_MAC_DEBUG */ jpayne@69: jpayne@69: #endif