kview.h 776 B

1234567891011121314151617181920212223242526272829303132333435
  1. /** @file view.h
  2. *
  3. * @brief Klish scheme's "view" entry
  4. */
  5. #ifndef _klish_kview_h
  6. #define _klish_kview_h
  7. #include <faux/faux.h>
  8. #include <faux/error.h>
  9. #include <klish/iview.h>
  10. #include <klish/kcommand.h>
  11. typedef struct kview_s kview_t;
  12. C_DECL_BEGIN
  13. kview_t *kview_new(const char *name);
  14. void kview_free(kview_t *view);
  15. const char *kview_name(const kview_t *view);
  16. bool_t kview_add_command(kview_t *view, kcommand_t *command);
  17. kcommand_t *kview_find_command(const kview_t *view, const char *name);
  18. bool_t kview_parse(kview_t *view, const iview_t *info, faux_error_t *error);
  19. bool_t kview_nested_from_iview(kview_t *kview, iview_t *iview,
  20. faux_error_t *error);
  21. kview_t *kview_from_iview(iview_t *iview, faux_error_t *error);
  22. C_DECL_END
  23. #endif // _klish_kview_h