ischeme.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /** @file ischeme.h
  2. *
  3. * @brief Klish Scheme
  4. */
  5. #ifndef _klish_ischeme_h
  6. #define _klish_ischeme_h
  7. #include <faux/error.h>
  8. #include <klish/iplugin.h>
  9. #include <klish/ientry.h>
  10. #include <klish/kscheme.h>
  11. #define ACTION_LIST .actions = &(iaction_t * []) {
  12. #define END_ACTION_LIST NULL }
  13. #define ACTION &(iaction_t)
  14. #define HOTKEY_LIST .hotkeys = &(ihotkey_t * []) {
  15. #define END_HOTKEY_LIST NULL }
  16. #define HOTKEY &(ihotkey_t)
  17. #define PLUGIN_LIST .plugins = &(iplugin_t * []) {
  18. #define END_PLUGIN_LIST NULL }
  19. #define PLUGIN &(iplugin_t)
  20. #define ENTRY_LIST .entrys = &(ientry_t * []) {
  21. #define END_ENTRY_LIST NULL }
  22. #define ENTRY &(ientry_t)
  23. typedef struct ischeme_s {
  24. char *name;
  25. ientry_t * (*entrys)[];
  26. iplugin_t * (*plugins)[];
  27. } ischeme_t;
  28. C_DECL_BEGIN
  29. bool_t ischeme_parse_nested(const ischeme_t *ischeme, kscheme_t *kscheme,
  30. faux_error_t *error);
  31. bool_t ischeme_load(const ischeme_t *ischeme, kscheme_t *kscheme,
  32. faux_error_t *error);
  33. char *ischeme_deploy(const kscheme_t *scheme, int level);
  34. C_DECL_END
  35. #endif // _klish_ischeme_h