| 331 | |
| 332 | |
| 333 | ResultType InputStart(input_type &input) |
| 334 | { |
| 335 | ASSERT(!input.InProgress()); |
| 336 | |
| 337 | // Keep the object alive while it is active, even if the script discards it. |
| 338 | // The corresponding Release() is done when g_input is reset by InputRelease(). |
| 339 | if (input.ScriptObject) |
| 340 | input.ScriptObject->AddRef(); |
| 341 | |
| 342 | // Set or update the timeout timer if needed. The timer proc takes care to end |
| 343 | // only those inputs which are due, and will reset or kill the timer as needed. |
| 344 | if (input.Timeout > 0) |
| 345 | input.SetTimeoutTimer(); |
| 346 | |
| 347 | input.Prev = g_input; |
| 348 | input.Start(); |
| 349 | g_input = &input; // Signal the hook to start the input. |
| 350 | |
| 351 | Hotkey::InstallKeybdHook(); // Install the hook (if needed). |
| 352 | |
| 353 | return OK; |
| 354 | } |
| 355 | |
| 356 | |
| 357 | void input_type::ParseOptions(LPTSTR aOptions) |
no test coverage detected