Heromyth / Iup4D

A D binding library for IUP with OOP style. Its API is similar to WinForms.
9 stars 0 forks source link

Turning off Idle callback #1

Open wilsonjord opened 6 years ago

wilsonjord commented 6 years ago

The only way I could figure out to set idle callback to "null" in order to prevent consuming CPU is by using unregisterCallback ("IDLE_ACTION")

However, once that happens you lose the ability to add your own idle callbacks like: Application.idle += &application_idle;

Only way I can see to get it back going is to register IDLE_ACTION callback again, but by that point use of Application.idle becomes redundant, you need to use the IupSetFunction calls directly. Is there a better way?

Heromyth commented 6 years ago

You are right. The event handler just a simple wrapper for IUP stuff. I'll try to fix it.