summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXTest.c
diff options
context:
space:
mode:
authorculler <culler>2018-11-06 21:21:50 (GMT)
committerculler <culler>2018-11-06 21:21:50 (GMT)
commit1cd3199254c47a7fd9e308663776b9e540d527c2 (patch)
tree448e2c1f7ba55253f13ed714dcecd4aa83e77417 /macosx/tkMacOSXTest.c
parentc5205ce3fbef20b6a3e78118e6ccfea8c05e0dd7 (diff)
downloadtk-1cd3199254c47a7fd9e308663776b9e540d527c2.zip
tk-1cd3199254c47a7fd9e308663776b9e540d527c2.tar.gz
tk-1cd3199254c47a7fd9e308663776b9e540d527c2.tar.bz2
Came up with a scheme for making test images behave the way that the
tests assume they do.
Diffstat (limited to 'macosx/tkMacOSXTest.c')
-rw-r--r--macosx/tkMacOSXTest.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index 92c925c..5576c44 100644
--- a/macosx/tkMacOSXTest.c
+++ b/macosx/tkMacOSXTest.c
@@ -82,25 +82,28 @@ DebuggerObjCmd(
/*
*----------------------------------------------------------------------
*
- * TkTestAppIsDrawing --
+ * TkTestSimulateDrawing --
+ *
+ * A test widget display procedure which records calls can use this to
+ * avoid duplicate calls which would occur due to fact that no valid
+ * graphics context is available to the idle task which is running the
+ * display proc. Note that no actual drawing to the screen will take
+ * place when this flag is set. This is just a wrapper for the NSApp
+ * property.
*
- * A widget display procedure can call this to determine whether it
- * is being run inside of the drawRect method. This is needed for
- * some tests, especially of the Text widget, which record data in
- * a global Tcl variable and assume that display procedures will be
- * run in a predictable sequence as Tcl idle tasks.
*
* Results:
- * True only while running the drawRect method of a TKContentView;
+ * Calls to low level drawing routines will return without actually
+ * drawing anything to the screen.
*
* Side effects:
* None
*
*----------------------------------------------------------------------
*/
-MODULE_SCOPE Bool
-TkTestAppIsDrawing(void) {
- return [NSApp isDrawing];
+MODULE_SCOPE void
+TkTestSimulateDrawing(Bool yesno) {
+ [NSApp setSimulateDrawing:yesno];
}