manager.h 856 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Plugins manager - The peTI-NESulator Project
  3. * plugins.h
  4. *
  5. * Created by Manoël Trapier on 02/04/07.
  6. * Copyright (c) 2002-2019 986-Studio.
  7. *
  8. */
  9. #ifndef PLUGINS_H
  10. #define PLUGINS_H
  11. #include <types.h>
  12. /* Function pointer for prototyping function that plugins may export */
  13. typedef int (*PluginInit)(void);
  14. typedef int (*PluginDeinit)(void);
  15. typedef void (*PluginKeypress)(void);
  16. #ifdef __TINES_PLUGINS__
  17. /* Available functions for plugins */
  18. int plugin_install_keypressHandler(uint8_t key, PluginKeypress);
  19. int plugin_remove_keypressHandler(uint8_t key, PluginKeypress);
  20. #else /* __TINES_PLUGINS__ */
  21. /* Available functions outside of plugins */
  22. int plugin_keypress(uint8_t key);
  23. /* Real Prototype: TBD */
  24. void plugin_list();
  25. int plugin_load(int id);
  26. int plugin_unload(int id);
  27. #endif /* __TINES_PLUGINS__ */
  28. #endif /* PLUGINS_H */