Tk Source Code

Check-in [4d1d025c]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix merging from trunk: Remove unused function GenerateWidgetViewSyncEvent, in the revised_text branch this became TkTextGenerateWidgetViewSyncEvent
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | revised_text | tip-466
Files: files | file ages | folders
SHA3-256: 4d1d025cafbc228fa3705512920ff91c20594417b6b2b06b2b6c8de0fedfd456
User & Date: fvogel 2018-11-15 19:43:59
Context
2018-11-15
20:01
Fix merging from trunk: Make logging arrangements for macOS10.14 available in revised_text branch check-in: b1cb77b6 user: fvogel tags: revised_text, tip-466
19:43
Fix merging from trunk: Remove unused function GenerateWidgetViewSyncEvent, in the revised_text branch this became TkTextGenerateWidgetViewSyncEvent check-in: 4d1d025c user: fvogel tags: revised_text, tip-466
14:11
Merge with trunk. check-in: 9524a8d9 user: culler tags: revised_text, tip-466
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkTextDisp.c.

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
....
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
# include "tkWinInt.h"
#elif defined(__CYGWIN__)
# include "tkUnixInt.h"
#endif

#ifdef MAC_OSX_TK
# include "tkMacOSXInt.h"
#define OK_TO_LOG (!TkpAppIsDrawing())
#define FORCE_DISPLAY(winPtr) TkpDisplayWindow(winPtr)
/* Version 8.5 has forgotten to define this constant. */
# ifndef TK_DO_NOT_DRAW
#  define TK_DO_NOT_DRAW 0x80
# endif
# ifndef DEF_TEXT_INACTIVE_SELECT_COLOR_DISABLED
#  define DEF_TEXT_INACTIVE_SELECT_COLOR_DISABLED "1"
# endif
#else /* for portability to 8.5/6 */
#define OK_TO_LOG 1
#define FORCE_DISPLAY(winPtr)
# ifndef DEF_TEXT_INACTIVE_SELECT_COLOR_DISABLED
#  define DEF_TEXT_INACTIVE_SELECT_COLOR_DISABLED "0"
# endif
#endif

#include <stdlib.h>
#include <assert.h>
................................................................................
	    }
	}

	/* The update process has removed the finished lines. */
	range = TkRangeListFirst(dInfoPtr->lineMetricUpdateRanges);
    }
}
 
/*
 *----------------------------------------------------------------------
 *
 * GenerateWidgetViewSyncEvent --
 *
 *      Send the <<WidgetViewSync>> event related to the text widget
 *      line metrics asynchronous update.
 *      This is equivalent to:
 *         event generate $textWidget <<WidgetViewSync>> -data $s
 *      where $s is the sync status: true (when the widget view is in
 *      sync with its internal data) or false (when it is not).
 *
 * Results:
 *      None
 *
 * Side effects:
 *      If corresponding bindings are present, they will trigger.
 *
 *----------------------------------------------------------------------
 */

static void
GenerateWidgetViewSyncEvent(
    TkText *textPtr,		/* Information about text widget. */
    Bool InSync)                /* true if in sync, false otherwise */
{
    /*
     * OSX 10.14 needs to be told to display the window when the Text Widget
     * is in sync.  (That is, to run DisplayText inside of the drawRect
     * method.)  Otherwise the screen might not get updated until an event
     * like a mouse click is received.  But that extra drawing corrupts the
     * data that the test suite is trying to collect.
     */
    
    if (!tkTextDebug) {
	FORCE_DISPLAY(textPtr->tkwin);
    }
    
    TkSendVirtualEvent(textPtr->tkwin, "WidgetViewSync",
        Tcl_NewBooleanObj(InSync));
}
 
/*
 *----------------------------------------------------------------------
 *
 * TkTextUpdateLineMetrics --
 *
 *	This function updates the pixel height calculations of a range of






<
<








<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







29
30
31
32
33
34
35


36
37
38
39
40
41
42
43


44
45
46
47
48
49
50
....
7173
7174
7175
7176
7177
7178
7179










































7180
7181
7182
7183
7184
7185
7186
# include "tkWinInt.h"
#elif defined(__CYGWIN__)
# include "tkUnixInt.h"
#endif

#ifdef MAC_OSX_TK
# include "tkMacOSXInt.h"


/* Version 8.5 has forgotten to define this constant. */
# ifndef TK_DO_NOT_DRAW
#  define TK_DO_NOT_DRAW 0x80
# endif
# ifndef DEF_TEXT_INACTIVE_SELECT_COLOR_DISABLED
#  define DEF_TEXT_INACTIVE_SELECT_COLOR_DISABLED "1"
# endif
#else /* for portability to 8.5/6 */


# ifndef DEF_TEXT_INACTIVE_SELECT_COLOR_DISABLED
#  define DEF_TEXT_INACTIVE_SELECT_COLOR_DISABLED "0"
# endif
#endif

#include <stdlib.h>
#include <assert.h>
................................................................................
	    }
	}

	/* The update process has removed the finished lines. */
	range = TkRangeListFirst(dInfoPtr->lineMetricUpdateRanges);
    }
}










































 
/*
 *----------------------------------------------------------------------
 *
 * TkTextUpdateLineMetrics --
 *
 *	This function updates the pixel height calculations of a range of