intro.bbdoc 827 B

1234567891011121314151617
  1. This module provides a generic way to hook into various BlitzMax commands, and to add support for
  2. hooks into your own code.
  3. The following hook ids are currently used by BlitzMax modules:
  4. | Hook id | Description | Data |
  5. | --- | --- | --- |
  6. | FlipHook | A Max2D #Flip is about to occur | Null |
  7. | EmitEventHook | An event has been emitted by a call to #EmitEvent | A #TEvent object |
  8. To hook into any of these functions, use #AddHook with the specified hook id and your hook function.
  9. To provide hook support for your own code, use #AllocHookId to generate a valid integer hook id
  10. somewhere in your program's startup code. Then, when the section of code you would like to be
  11. 'hookable' is about to execute, simply call #RunHooks with the previously generated hook id and your
  12. own custom 'data' object.