Confirmed users, Bureaucrats and Sysops emeriti
1,680
edits
| Line 181: | Line 181: | ||
When the Cocoa drawing model, null events are no longer used. Instead, two new timer functions have been added: | When the Cocoa drawing model, null events are no longer used. Instead, two new timer functions have been added: | ||
uint32 NPN_ScheduleTimer(NPP npp, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID)); | uint32 NPN_ScheduleTimer(NPP npp, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID)); | ||
npp - The plug-in instance pointer. | * npp - The plug-in instance pointer. | ||
interval - The timer interval in milliseconds. | * interval - The timer interval in milliseconds. | ||
repeat - Whether the timer should reschedule itself automatically. | * repeat - Whether the timer should reschedule itself automatically. | ||
timerFunc - A pointer to the function that will be run when the timer fires. | * timerFunc - A pointer to the function that will be run when the timer fires. | ||
This schedules a timer. The return value is 0 on error or a unique timeout ID on success. | This schedules a timer. The return value is 0 on error or a unique timeout ID on success. | ||
void NPN_UnscheduleTimer(NPP npp, uint32 timerID) | void NPN_UnscheduleTimer(NPP npp, uint32 timerID) | ||
npp - The plug-in instance pointer. | * npp - The plug-in instance pointer. | ||
timerID - A timerID returned from NPN_ScheduleTimer. | * timerID - A timerID returned from NPN_ScheduleTimer. | ||
This unschedules a previously scheduled timer. | This unschedules a previously scheduled timer. | ||