(clientData, gotFocus)
| 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 | |
| 1431 | static void |
| 1432 | TextFocusProc(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( |
nothing calls this directly
no test coverage detected