STATE_object_set_event

 

 


#define STATE_DELETE 1
#define STATE_DISABLE 2

   This function set a timer and an event that should happen after
   the time has elapsed.
   There only two events that could be used.
   STATE_DELETE and STATE_DISABLE.
   If STATE_DELETE is chosen then the object 
   will be automatically deleted after the time has elapsed
   If STATE_DISABLE is chosen then the object 
   will be automatically disabled after the time has elapsed
   The time is in milliseconds 
   Setting the timer to 0 will cancel any going event for this object.
   Note that after doing delete you cant use the handle any more
   so good practice is to do the following:
  	STATE_object_set_event(obj_handle,1000, STATE_DELETE);
  	obj_handle=NULL;
    
    Arguments:
  		object_handle: The object that should be associated with the event.
  
  		time_in_milliseconds: How long till the event will take place
  
  		event: STATE_DELETE or STATE_DISABLE. See remarks.
  		
  
   examples:
   A) 
  	  Setting the timer to two seconds
  	  STATE_object_set_event(obj_handle, 2000, STATE_DISABLE);
   B)
  	  Canceling the timer
  	  STATE_object_set_event(obj_handle, 0, any_number_will_do);

 

 

Go to page 1      Select API

 

Copyright © 2007 3DSTATE Corporation. www.3dstate.com