app_dialogs.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (C) 2021 Alibaba Group Holding Limited
  3. * Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef __APP_DIALOGS_H__
  10. #define __APP_DIALOGS_H__
  11. #include <curses.h>
  12. #include <csi_camera_property.h>
  13. #include "dialog.h"
  14. #include "param.h"
  15. #include "camera_manager.h"
  16. extern cams_t *cam_session; /* camera manager */
  17. /* curses window */
  18. #define WIN_COLS 100
  19. #define WIN_ROWS 40
  20. /* key defination */
  21. #define ENTER 10
  22. #define ESCAPE 27
  23. /* windoes created by main */
  24. extern WINDOW *menubar;
  25. extern WINDOW *messagebar;
  26. extern WINDOW *win_border;
  27. extern WINDOW *win_content;
  28. void message(char *ss, int status);
  29. int dialog_camera_list(void);
  30. int dialog_camera_open(void);
  31. int dialog_camera_set_mode(void);
  32. int dialog_camera_property_list(void);
  33. int dialog_camera_close(void);
  34. int dialog_camera_property_boolean(csi_camera_property_description_s *property);
  35. int dialog_camera_property_integer(csi_camera_property_description_s *property);
  36. int dialog_camera_property_enum(csi_camera_property_description_s *property);
  37. int dialog_camera_property_bitmask(csi_camera_property_description_s *property);
  38. int dialog_channel_list(void);
  39. int dialog_channel_select(csi_camera_channel_cfg_s **selected_chn, int action);
  40. int dialog_channel_open(csi_camera_channel_cfg_s *channel);
  41. int dialog_event_subscribe_action_list(camera_event_action_union_t **event_action);
  42. int dialog_event_subscribe_action_camera(camera_event_action_union_t *event_action);
  43. int dialog_event_subscribe_action_channel(camera_event_action_union_t *event_action);
  44. int dialog_channel_run(void);
  45. #endif /* __APP_DIALOGS_H__ */