File Manager / inc /

main-app.h

  1. /*
  2. * Copyright 2014 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. #ifndef __MAIN_APP_H__
  18. #define __MAIN_APP_H__
  19.  
  20. #include <Evas.h>
  21.  
  22. /* Forward declaration: */
  23. struct _fs_manager;
  24. struct _window_obj;
  25. struct _clipboard;
  26. struct _navi_path_widget;
  27. struct _navigator;
  28. struct _navi_path_storage;
  29.  
  30. typedef enum {
  31. MODE_DEFAULT = 0,
  32. MODE_EDIT
  33. } mode;
  34.  
  35. /**
  36. * @brief Application status data
  37. */
  38. typedef struct _status {
  39. mode curr_mode; /**< Current app mode */
  40. Eina_Bool is_mainview; /**< Current view is main view or not */
  41. } status_data;
  42.  
  43. /**
  44. * @brief Application data
  45. */
  46. typedef struct _app_data {
  47. struct _window_obj *win; /**< Window object */
  48. struct _fs_manager *manager; /**< File managet object */
  49. struct _clipboard *clipboard; /**< Clipboard object */
  50. struct _navigator *navigator; /**< Navigator object */
  51. struct _navi_path_storage *path_storage;/**< Path storage object */
  52. Evas_Object *navi; /**< Naviframe object */
  53. status_data status; /**< App status object */
  54. } app_data;
  55.  
  56. /**
  57. * @brief Create application instance
  58. * @return Application instance on success, otherwise NULL
  59. */
  60. app_data *app_create();
  61.  
  62. /**
  63. * @brief Destroy application instance
  64. * @param[in] app Application instance
  65. */
  66. void app_destroy(app_data *app);
  67.  
  68. /**
  69. * @brief Run Tizen application
  70. * @param[in] app Application instance
  71. * @param[in] argc argc paremeter received in main
  72. * @param[in] argv argv parameter received in main
  73. */
  74. int app_run(app_data *app, int argc, char **argv);
  75.  
  76. #endif // __MAIN_APP_H__
  77.