ischeme.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /** @file ischeme.h
  2. *
  3. * @brief Klish Scheme
  4. */
  5. #ifndef _klish_ischeme_h
  6. #define _klish_ischeme_h
  7. #include <klish/iptype.h>
  8. #include <klish/iplugin.h>
  9. #include <klish/iview.h>
  10. #define VIEW_LIST .views = &(iview_t * []) {
  11. #define END_VIEW_LIST NULL }
  12. #define VIEW &(iview_t)
  13. #define PTYPE_LIST .ptypes = &(iptype_t * []) {
  14. #define END_PTYPE_LIST NULL }
  15. #define PTYPE &(iptype_t)
  16. #define COMMAND_LIST .commands = &(icommand_t * []) {
  17. #define END_COMMAND_LIST NULL }
  18. #define COMMAND &(icommand_t)
  19. #define PARAM_LIST .params = &(iparam_t * []) {
  20. #define END_PARAM_LIST NULL }
  21. #define PARAM &(iparam_t)
  22. #define ACTION_LIST .actions = &(iaction_t * []) {
  23. #define END_ACTION_LIST NULL }
  24. #define ACTION &(iaction_t)
  25. #define PLUGIN_LIST .plugins = &(iplugin_t * []) {
  26. #define END_PLUGIN_LIST NULL }
  27. #define PLUGIN &(iplugin_t)
  28. typedef struct ischeme_s {
  29. char *name;
  30. iplugin_t * (*plugins)[];
  31. iptype_t * (*ptypes)[];
  32. iview_t * (*views)[];
  33. } ischeme_t;
  34. C_DECL_BEGIN
  35. char *ischeme_to_text(const ischeme_t *ischeme, int level);
  36. C_DECL_END
  37. #endif // _klish_ischeme_h