File Manager / inc / view /

list-view.h

  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 LIST_VIEW_H_
  19. #define LIST_VIEW_H_
  20.  
  21. #include "view/view.h"
  22. #include <Elementary.h>
  23.  
  24. struct _app_data;
  25.  
  26. typedef enum {
  27. UPDATE_TYPE_VIEW = 0x0001,
  28. UPDATE_TYPE_GENLIST = 0x0002,
  29. UPDATE_TYPE_CTRL_BAR_MODE = 0x0004,
  30. UPDATE_TYPE_CTRL_BAR_STATE = 0x0008
  31. } update_type;
  32.  
  33. /**
  34. * @brief Creates list view for concrete directory
  35. * @param[in] app A descriptor of the application.
  36. * @param[in] parent Parent object
  37. * @param[in] path The path of directory
  38. * @param[in] dir_name Directory name
  39. * @return Error code. RESULT_TYPE_OK if operation success.
  40. */
  41. int list_view_add(struct _app_data *app, Evas_Object *parent, const char *path, const char *dir_name);
  42.  
  43. /**
  44. * @brief Updates view
  45. * @param[in] navi_item Navi Item which needs update.
  46. * @param[in] update_options Parameter for check which widget update.
  47. * @return Error code. RESULT_TYPE_OK if operation success.
  48. */
  49. int list_view_update(Elm_Object_Item *navi_item, int update_options);
  50.  
  51. /**
  52. * @brief Returns counter items in view
  53. * @param[in] view View object.
  54. * @return Items counter.
  55. */
  56. unsigned int list_view_items_count_get(view_data *view);
  57.  
  58. /**
  59. * @brief Creates new folder
  60. * @param[in] view View object.
  61. * @param[in] folder_name Folder name.
  62. * @return Error code. RESULT_TYPE_OK if operation success.
  63. */
  64. int list_view_create_folder(view_data *view, const char *folder_name);
  65.  
  66. /**
  67. * @brief Set all items select status
  68. * @param[in] view View object.
  69. * @param[in] state Selected state.
  70. * @return Error code. RESULT_TYPE_OK if operation success.
  71. */
  72. int list_view_select_all(view_data *view, Eina_Bool state);
  73.  
  74. /**
  75. * @brief Delete items from view
  76. * @param[in] view View object.
  77. * @return Error code. RESULT_TYPE_OK if operation success.
  78. */
  79. int list_view_delete_items(view_data *view);
  80.  
  81. /**
  82. * @brief Sets selected items to clipboard and sets operation type "copy"
  83. * @param[in] view View object.
  84. * @return Error code. RESULT_TYPE_OK if operation success.
  85. */
  86. int list_view_copy_items(view_data *view);
  87.  
  88. /**
  89. * @brief Sets selected items to clipboard and sets operation type "move"
  90. * @param[in] view View object.
  91. * @return Error code. RESULT_TYPE_OK if operation success.
  92. */
  93. int list_view_move_items(view_data *view);
  94.  
  95. /**
  96. * @brief Past items items from clipboard
  97. * @param[in] view View object.
  98. * @return Error code. RESULT_TYPE_OK if operation success.
  99. */
  100. int list_view_past_items(view_data *view);
  101.  
  102. #endif /* LIST_VIEW_H_ */