MCPcopy Create free account
hub / github.com/SimHacker/micropolis / TextFocusProc

Function TextFocusProc

micropolis-activity/src/tk/tktext.c:1418–1441  ·  view source on GitHub ↗
(clientData, gotFocus)

Source from the content-addressed store, hash-verified

1416 * TextFocusProc --
1417 *
1418 * This procedure is called whenever the entry gets or loses the
1419 * input focus. It's also called whenever the window is reconfigured
1420 * while it has the focus.
1421 *
1422 * Results:
1423 * None.
1424 *
1425 * Side effects:
1426 * The cursor gets turned on or off.
1427 *
1428 *----------------------------------------------------------------------
1429 */
1430
1431static void
1432TextFocusProc(clientData, gotFocus)
1433 ClientData clientData; /* Pointer to structure describing text. */
1434 int gotFocus; /* 1 means window is getting focus, 0 means
1435 * it's losing it. */
1436{
1437 register TkText *textPtr = (TkText *) clientData;
1438 int lineNum;
1439
1440 Tk_DeleteTimerHandler(textPtr->insertBlinkHandler);
1441 if (gotFocus) {
1442 textPtr->flags |= GOT_FOCUS | INSERT_ON;
1443 if (textPtr->insertOffTime != 0) {
1444 textPtr->insertBlinkHandler = Tk_CreateTimerHandler(

Callers

nothing calls this directly

Calls 4

TkBTreeLineIndexFunction · 0.85
TkTextLinesChangedFunction · 0.85
Tk_DeleteTimerHandlerFunction · 0.70
Tk_CreateTimerHandlerFunction · 0.70

Tested by

no test coverage detected