]> code.delx.au - gnu-emacs/commit
Enhance NSTRACE (trace output for NextStep).
authorAnders Lindgren <andlind@gmail.com>
Sun, 15 Nov 2015 19:19:34 +0000 (20:19 +0100)
committerAnders Lindgren <andlind@gmail.com>
Sun, 15 Nov 2015 19:19:34 +0000 (20:19 +0100)
commitae16894d1e19601e19b1e70461dc0f69ae1f1059
treeb03e162dece6682428a53e047eadf5f96d6a3ff3
parent6d109c051c482bbd5b01f8ed19ed78069efaee42
Enhance NSTRACE (trace output for NextStep).

Trace can be disabled for groups of functions. By default, event
functions and functions that generate lots of output are disabled.

Trace output of Objective-C functions now use the "[ClassName
parameter:]" form.

* src/nsterm.h (NSTRACE_ALL_GROUPS, NSTRACE_GROUP_EVENTS)
(NSTRACE_GROUP_UPDATES, NSTRACE_GROUP_FRINGE, NSTRACE_GROUP_COLOR)
(NSTRACE_GROUP_GLYPHS, NSTRACE_GROUP_FOCUS): New macros,
controlling in which function groups trace should be active.
(NSTRACE_WHEN): Support for silencing a function, this also
silencing all called functions.
(NSTRACE_UNSILENCE): New macro, used to re-enable trace.
(NSTRACE_FMT_FSTYPE, NSTRACE_ARG_FSTYPE): New macros, used to
print the full screen state in NSTRACE functions.

* src/nsterm.m (nstrace_depth, nstrace_num): Made volatile as they
can be accessed from multiple threads.
(nstrace_enabled_global): New variable, when FALSE, trace is
silenced.
(nstrace_restore_global_trace_state): New function, used to
restore `nstrace_enabled_global' at end of block.
([EmacsView setFrame:], [EmacsWindow setFrame:display:])
([EmacsWindow setFrame:display:animation:])
([EmacsWindow setFrameTopLeftPoint:]): New functions, print trace
and call corresponding super function.
(Many functions): Add or enhance trace output.

* src/nsimage.m (ns_image_from_file): Enhanced trace output.

* src/nsfns.m (x_set_tool_bar_lines): Add trace output.

* src/nsmenu.m ([EmacsToolbar setVisible:]): New function, print trace
and call corresponding super function.
src/nsfns.m
src/nsimage.m
src/nsmenu.m
src/nsterm.h
src/nsterm.m