Talk:CudaText API

From Free Pascal wiki
Jump to navigationJump to search
(no topics here)

timer_proc: todo

timer_proc(id, callback, interval)

Perform action on timers.

  • callback: String in the form "module_name.method_name". App will call "method_name()" in the class "Command", in specified module (e.g. "cuda_my_plugin").
  • interval: Timer delay in msec. Need to specify on starting timer, value 50+.

Possible values of id:

  • TIMER_START - Create (if needed) and start timer, infinite ticks.
  • TIMER_START_ONE - Create (if needed) and start timer, for single tick.
  • TIMER_STOP - Stop timer (callback must be created before).
  • TIMER_DELETE - Stop timer and delete it (free memory).

Result is True if params ok; False if params not ok (callback str incorrect, interval incorrect, not created callback on stopping); or None (for unknown id).