AITimerSuite Struct Reference
[API Suite List]
These functions allow you to schedule events by registering timer plug-ins.  
More...
#include <AITimer.h>
List of all members.
| Public Attributes | 
| AIAPI AIErr(* | AddTimer )(SPPluginRef self, const char *name, ai::int32 period, AITimerHandle *timer) | 
|  | Adds a timer plug-in to Illustrator. 
 | 
| AIAPI AIErr(* | GetTimerName )(AITimerHandle timer, char **name) | 
|  | Retrieves the name string of a timer. 
 | 
| AIAPI AIErr(* | GetTimerActive )(AITimerHandle timer, AIBoolean *active) | 
|  | Reports whether a timer is active. 
 | 
| AIAPI AIErr(* | SetTimerActive )(AITimerHandle timer, AIBoolean active) | 
|  | Activates or deactivates a timer. 
 | 
| AIAPI AIErr(* | GetTimerPeriod )(AITimerHandle timer, ai::int32 *period) | 
|  | Retrieves the notification interval for a timer. 
 | 
| AIAPI AIErr(* | SetTimerPeriod )(AITimerHandle timer, ai::int32 period) | 
|  | Sets the notification interval for a timer. 
 | 
| AIAPI AIErr(* | GetTimerPlugin )(AITimerHandle timer, SPPluginRef *plugin) | 
|  | Retrieves a reference to the plug-in that installed a timer, to use with the AIPluginSuite.
 | 
| AIAPI AIErr(* | CountTimers )(ai::int32 *count) | 
|  | Counts the number of timers available. 
 | 
| AIAPI AIErr(* | GetNthTimer )(ai::int32 n, AITimerHandle *timer) | 
|  | Retrieves a timer by position index. 
 | 
Detailed Description
These functions allow you to schedule events by registering timer plug-ins. 
Use these functions to add timers, turn timers on and off, and enumerate and access the installed timer plug-ins.
Illustrator notifies registered timer plug-ins when a specified period of time has passed. It sends a message to the plug-in's main entry point with caller kCallerAITimer and selector kSelectorAIGoTimer.
Timer periods are specified in clock ticks. There are kTicksPerSecond ticks in a second.
Timers are typically used in conjunction with other plug-ins, such as menus or windows, which determine when an update is needed.
Member Data Documentation
Adds a timer plug-in to Illustrator. 
Use at startup. 
- Parameters:
- 
  
    |  | self | This plug-in. |  |  | name | The unique identifying name of the timer. |  |  | period | The time period for notification, the number of clock ticks that should pass before the timer is notified. For seconds, multiply the number of seconds by kTicksPerSecond. |  |  | timer | [out] A buffer in which to return the timer reference. If you install more than one timer plug-in, save to compare to the reference passed in the AITimerMessageto determine which action to take. |  
 
This call requests notification once a second: 
        AIErr error;
        error = sTimer->AddTimer( message->d.self, "Time for Timer", kTicksPerSecond, &g->secondTimer );
 
 
Counts the number of timers available. 
Use with GetNthTimer() to iterate through installed timers. 
- Parameters:
- 
  
    |  | count | [out] A buffer in which to return the number of installed timers. |  
 
 
 
Retrieves a timer by position index. 
Use with CountTimers() to iterate through installed timers. 
- Parameters:
- 
  
    |  | n | The 0-based position index. |  |  | timer | [out] A buffer in which to return the timer reference. |  
 
 
 
Reports whether a timer is active. 
An active timer receives periodic notifications. 
- Parameters:
- 
  
    |  | time | The timer reference. |  |  | active | [out] A buffer in which to return true if the timer is active. |  
 
 
 
Retrieves the name string of a timer. 
- Parameters:
- 
  
    |  | time | The timer reference. |  |  | name | [out] A buffer in which to return the name string. Do not modify this string. |  
 
 
 
Retrieves the notification interval for a timer. 
- Parameters:
- 
  
    |  | time | The timer reference. |  |  | period | [out] A buffer in which to return the interval, in clock ticks. . |  
 
 
 
Retrieves a reference to the plug-in that installed a timer, to use with the AIPluginSuite. 
- Parameters:
- 
  
    |  | time | The timer reference. |  |  | plugin | [out] A buffer in which to return the plug-in reference. |  
 
 
 
Activates or deactivates a timer. 
You must deactivate timers as part of terminating the plug-in. 
- Parameters:
- 
  
    |  | time | The timer reference. |  |  | active | True to activate the timer, false to deactivate it. |  
 
 
 
Sets the notification interval for a timer. 
- Parameters:
- 
  
    |  | time | The timer reference. |  |  | period | The new interval, in clock ticks. For seconds, multiply the number of seconds by kTicksPerSecond. |  
 
 
 
The documentation for this struct was generated from the following file: