kcontext.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /** @file kcontext.h
  2. *
  3. * @brief Klish context to pass to plugin's functions
  4. */
  5. #ifndef _klish_kcontext_h
  6. #define _klish_kcontext_h
  7. #include <klish/kcontext_base.h>
  8. #include <klish/kscheme.h>
  9. C_DECL_BEGIN
  10. // type
  11. kcontext_type_e kcontext_type(const kcontext_t *context);
  12. FAUX_HIDDEN bool_t kcontext_set_type(kcontext_t *context, kcontext_type_e type);
  13. // retcode
  14. int kcontext_retcode(const kcontext_t *context);
  15. FAUX_HIDDEN bool_t kcontext_set_retcode(kcontext_t *context, int retcode);
  16. // plugin
  17. kplugin_t *kcontext_plugin(const kcontext_t *context);
  18. FAUX_HIDDEN bool_t kcontext_set_plugin(kcontext_t *context, kplugin_t *plugin);
  19. // sym
  20. ksym_t *kcontext_sym(const kcontext_t *context);
  21. FAUX_HIDDEN bool_t kcontext_set_sym(kcontext_t *context, ksym_t *sym);
  22. // action
  23. kaction_t *kcontext_action(const kcontext_t *context);
  24. FAUX_HIDDEN bool_t kcontext_set_action(kcontext_t *context, kaction_t *action);
  25. // command
  26. kcommand_t *kcontext_command(const kcontext_t *context);
  27. FAUX_HIDDEN bool_t kcontext_set_command(kcontext_t *context, kcommand_t *command);
  28. C_DECL_END
  29. #endif // _klish_kcontext_h