76 |
VM_EXEC_ERROR = (1<<2), ///< A runtime error occurred while executing the script (i.e. a call to some built-in script function failed). |
VM_EXEC_ERROR = (1<<2), ///< A runtime error occurred while executing the script (i.e. a call to some built-in script function failed). |
77 |
}; |
}; |
78 |
|
|
79 |
|
/** @brief Script event handler type. |
80 |
|
* |
81 |
|
* Identifies one of the possible event handler callback types defined by |
82 |
|
* the NKSP script language. |
83 |
|
*/ |
84 |
|
enum VMEventHandlerType_t { |
85 |
|
VM_EVENT_HANDLER_INIT, ///< Initilization event handler, that is script's "on init ... end on" code block. |
86 |
|
VM_EVENT_HANDLER_NOTE, ///< Note event handler, that is script's "on note ... end on" code block. |
87 |
|
VM_EVENT_HANDLER_RELEASE, ///< Release event handler, that is script's "on release ... end on" code block. |
88 |
|
VM_EVENT_HANDLER_CONTROLLER, ///< Controller event handler, that is script's "on controller ... end on" code block. |
89 |
|
}; |
90 |
|
|
91 |
// just symbol prototyping |
// just symbol prototyping |
92 |
class VMIntExpr; |
class VMIntExpr; |
93 |
class VMStringExpr; |
class VMStringExpr; |
639 |
class VMEventHandler { |
class VMEventHandler { |
640 |
public: |
public: |
641 |
/** |
/** |
642 |
|
* Type of this event handler, which identifies its purpose. For example |
643 |
|
* for a "on note ... end on" script callback block, |
644 |
|
* @c VM_EVENT_HANDLER_NOTE would be returned here. |
645 |
|
*/ |
646 |
|
virtual VMEventHandlerType_t eventHandlerType() const = 0; |
647 |
|
|
648 |
|
/** |
649 |
* Name of the event handler which identifies its purpose. For example |
* Name of the event handler which identifies its purpose. For example |
650 |
* for a "on note ... end on" script callback block, the name "note" |
* for a "on note ... end on" script callback block, the name "note" |
651 |
* would be returned here. |
* would be returned here. |