Menu

#159 timer_add()/timer_remove() macros

open
nobody
None
5
2007-01-25
2007-01-25
Bert Wesarg
No

this adds two new macro subroutines for handling timeouts

syntax:
timeoutid timer_add(string macro_subroutine_name, int timeout_in_msec);

void timer_remove(timeoutid id);

there can be a problem on LP64 architectures, the nedit macro language have only int support but the XtIntervalId is defined as unsigned long, so there can be domain error, I try to catch this error.

The code to call a macro subroutine is from the Patch Collection patch (see applyFileOpenHook())

Discussion

  • Bert Wesarg

    Bert Wesarg - 2007-01-25

    gen1

     
  • Bert Wesarg

    Bert Wesarg - 2007-01-26

    gen2

     
  • Bert Wesarg

    Bert Wesarg - 2007-01-26

    Logged In: YES
    user_id=122956
    Originator: YES

    gen2:

    * fix a bug, when the initial timer_add() window was closed between timer_add() and timeout
    * add a new option to timer_add(): "global" => call macro subroutine, even if the current top window isn't the timer_add() window
    the default option is not to run the macro

    File Added: timer_macros.patch

     

Log in to post a comment.