File Manager / inc / view /
  1. /*
  2. * Copyright 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *
  16. */
  17.  
  18. #ifndef _NAVIGATOR_H_
  19. #define _NAVIGATOR_H_
  20.  
  21. #include "view/view.h"
  22. #include "main-app.h"
  23.  
  24. /* Forward declaration: */
  25. typedef struct _navigator navigator;
  26.  
  27. /**
  28. * @brief Create navigator instance
  29. * @return File system manager instance on success, otherwise NULL
  30. */
  31. navigator *navigator_create(app_data *data);
  32.  
  33. /**
  34. * @brief Destroy navigator instance
  35. * @param[in] navi Navigator instance
  36. */
  37. void navigator_destroy(navigator *navi);
  38.  
  39. /**
  40. * @brief Add view to navigator
  41. * @param[in] navi Navigator instance
  42. * @param[in] view_title View title
  43. * @param[in] view View data
  44. * @return Error code. RESULT_TYPE_OK if operation success.
  45. */
  46. int navigator_add_view(navigator *navi, const char *view_title, view_data *view);
  47.  
  48. /**
  49. * @brief Make navigation to previous view
  50. * @param[in] navi Navigator instance
  51. * @return Error code. RESULT_TYPE_OK if operation success.
  52. */
  53. int navigator_goto_previous_view(navigator *navi);
  54.  
  55. /**
  56. * @brief Make navigation to root view
  57. * @param[in] navi Navigator instance
  58. * @return Error code. RESULT_TYPE_OK if operation success.
  59. */
  60. int navigator_goto_root_view(navigator *navi);
  61.  
  62. /**
  63. * @brief Make navigation to view by its index
  64. * @param[in] navi Navigator instance
  65. * @param[in] index View index in stack
  66. * @return Error code. RESULT_TYPE_OK if operation success.
  67. */
  68. int navigator_goto_view_by_index(navigator *navi, int index);
  69.  
  70. #endif /* _NAVIGATOR_H_ */