darktable-org/darktable — pull request #241 by boucman (2013-05-18 18:46:44+00:00)
Title: lua : add events

darktable.register_event(event_type,callback,...)

this function register a callback to be called when a given event happents

* event_type : the event to register to
* callback : the function to call on event
* ... : extra parameters, depend on the type of event

this implemnts two events

* post-import-image : no extra parameters
called when an image is imported into the database, before any processing happens. Can be registered multiple times
* shortcut : one extra parameter : string : name of the shortcut in the shortcut panel
called when the corresponding shortcut is pressed. can only be registered once per shortcut