2010-05-08 06:20:46 -06:00
|
|
|
/* $XTermId: trace.h,v 1.52 2010/04/05 00:11:01 tom Exp $ */
|
2006-11-26 04:11:12 -07:00
|
|
|
|
2010-03-25 16:03:51 -06:00
|
|
|
/*
|
|
|
|
*
|
2010-05-08 06:20:46 -06:00
|
|
|
* Copyright 1997-2009,2010 by Thomas E. Dickey
|
2010-03-25 16:03:51 -06:00
|
|
|
*
|
|
|
|
* All Rights Reserved
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included
|
|
|
|
* in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
|
|
* IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
|
|
|
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
* Except as contained in this notice, the name(s) of the above copyright
|
|
|
|
* holders shall not be used in advertising or otherwise to promote the
|
|
|
|
* sale, use or other dealings in this Software without prior written
|
|
|
|
* authorization.
|
|
|
|
*
|
|
|
|
*/
|
2006-11-26 04:11:12 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Common/useful definitions for XTERM application
|
|
|
|
*/
|
|
|
|
#ifndef included_trace_h
|
|
|
|
#define included_trace_h
|
|
|
|
|
|
|
|
#include <xterm.h>
|
|
|
|
|
|
|
|
#if OPT_TRACE
|
|
|
|
|
2008-02-16 02:34:45 -07:00
|
|
|
extern void Trace ( const char *, ... )
|
2006-11-26 04:11:12 -07:00
|
|
|
#ifdef GCC_PRINTF
|
|
|
|
__attribute__ ((format(printf,1,2)))
|
|
|
|
#endif
|
|
|
|
;
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE(p) Trace p
|
|
|
|
|
|
|
|
#if OPT_TRACE > 1
|
|
|
|
#define TRACE2(p) Trace p
|
|
|
|
#endif
|
|
|
|
|
2009-09-05 09:58:09 -06:00
|
|
|
extern char * visibleChars (Char * /* buf */, unsigned /* len */);
|
2006-11-26 04:11:12 -07:00
|
|
|
extern char * visibleIChar (IChar *, unsigned);
|
2009-09-05 09:58:09 -06:00
|
|
|
extern char * visibleIChars (IChar * /* buf */, unsigned /* len */);
|
2010-03-25 16:03:51 -06:00
|
|
|
extern const char * visibleChrsetName(unsigned /* chrset */);
|
2007-06-15 13:29:55 -06:00
|
|
|
extern const char * visibleEventType (int);
|
2010-03-25 16:03:51 -06:00
|
|
|
extern const char * visibleNotifyDetail(int /* code */);
|
2009-04-04 09:10:44 -06:00
|
|
|
extern const char * visibleSelectionTarget(Display * /* d */, Atom /* a */);
|
2007-06-15 13:29:55 -06:00
|
|
|
extern const char * visibleXError (int /* code */);
|
2006-11-26 04:11:12 -07:00
|
|
|
|
2007-06-15 13:29:55 -06:00
|
|
|
extern void TraceArgv(const char * /* tag */, char ** /* argv */);
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE_ARGV
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE_ARGV(tag,argv) TraceArgv(tag,argv)
|
|
|
|
|
2009-10-31 08:11:57 -06:00
|
|
|
extern const char *trace_who;
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE_CHILD
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE_CHILD int tracing_child = (trace_who = "child") != 0; (void) tracing_child;
|
|
|
|
|
2010-03-25 16:03:51 -06:00
|
|
|
extern void TraceFocus(Widget, XEvent *);
|
|
|
|
#undef TRACE_FOCUS
|
|
|
|
#define TRACE_FOCUS(w,e) TraceFocus((Widget)w, (XEvent *)e)
|
|
|
|
|
2006-11-26 04:11:12 -07:00
|
|
|
extern void TraceSizeHints(XSizeHints *);
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE_HINTS
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE_HINTS(hints) TraceSizeHints(hints)
|
|
|
|
|
2008-08-25 12:05:56 -06:00
|
|
|
extern void TraceIds(const char * /* fname */, int /* lnum */);
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE_IDS
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE_IDS TraceIds(__FILE__, __LINE__)
|
|
|
|
|
2008-08-25 12:05:56 -06:00
|
|
|
extern void TraceOptions(OptionHelp * /* options */, XrmOptionDescRec * /* resources */, Cardinal /* count */);
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE_OPTS
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE_OPTS(opts,ress,lens) TraceOptions(opts,ress,lens)
|
|
|
|
|
|
|
|
extern void TraceTranslations(const char *, Widget);
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE_TRANS
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE_TRANS(name,w) TraceTranslations(name,w)
|
|
|
|
|
|
|
|
extern void TraceWMSizeHints(XtermWidget);
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE_WM_HINTS
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE_WM_HINTS(w) TraceWMSizeHints(w)
|
|
|
|
|
|
|
|
extern void TraceXtermResources(void);
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef TRACE_XRES
|
2006-11-26 04:11:12 -07:00
|
|
|
#define TRACE_XRES() TraceXtermResources()
|
|
|
|
|
2008-08-25 12:05:56 -06:00
|
|
|
extern int TraceResizeRequest(const char * /* fn */, int /* ln */, Widget /* w */, Dimension /* reqwide */, Dimension /* reqhigh */, Dimension * /* gotwide */, Dimension * /* gothigh */);
|
2009-04-04 09:10:44 -06:00
|
|
|
#undef REQ_RESIZE
|
2008-08-25 12:05:56 -06:00
|
|
|
#define REQ_RESIZE(w, reqwide, reqhigh, gotwide, gothigh) \
|
2010-05-08 06:20:46 -06:00
|
|
|
TraceResizeRequest(__FILE__, __LINE__, w, \
|
|
|
|
(Dimension) (reqwide), (Dimension) (reqhigh), \
|
|
|
|
(gotwide), (gothigh))
|
2008-08-25 12:05:56 -06:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define REQ_RESIZE(w, reqwide, reqhigh, gotwide, gothigh) \
|
|
|
|
XtMakeResizeRequest((Widget) (w), \
|
|
|
|
(Dimension) (reqwide), (Dimension) (reqhigh), \
|
|
|
|
(gotwide), (gothigh))
|
|
|
|
|
2006-11-26 04:11:12 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* included_trace_h */
|