kview.h 520 B

12345678910111213141516171819202122232425262728293031
  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 <klish/kcommand.h>
  8. typedef struct kview_s kview_t;
  9. typedef struct iview_s {
  10. char *name;
  11. icommand_t * (*commands)[];
  12. } iview_t;
  13. C_DECL_BEGIN
  14. kview_t *kview_new(iview_t info);
  15. kview_t *kview_new_static(iview_t info);
  16. void kview_free(kview_t *view);
  17. const char *kview_name(const kview_t *view);
  18. bool_t kview_add_command(kview_t *view, kcommand_t *command);
  19. C_DECL_END
  20. #endif // _klish_kview_h