File Manager / inc / view /

genlist-widget.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 GENLIST_H_
  19. #define GENLIST_H_
  20.  
  21. #include "view/view.h"
  22. #include <Elementary.h>
  23.  
  24. Elm_Genlist_Item_Class itc;
  25.  
  26. /**
  27. * @brief Genlist widget data
  28. */
  29. typedef struct {
  30. view_data *view; /**< Parent view */
  31. Evas_Object *genlist; /**< Genlist object */
  32. Evas_Object *sel_all_checkbox; /**< 'Select all' checkbox object */
  33. Evas_Object *sel_all_layout; /**< 'Select all' layout object */
  34. Evas_Object *box; /**< Box object */
  35. } genlist_widget;
  36.  
  37. /**
  38. *@brief Add new genlist widget to view
  39. *@param[in] view View object.
  40. *@return Genlist widget on success or NULL.
  41. */
  42. genlist_widget *genlist_widget_add(view_data *view);
  43.  
  44. /**
  45. *@brief Set content to genlist
  46. *@param[in] widget Widget object.
  47. *@param[in] file_list List with file items.
  48. */
  49. void genlist_widget_content_set(genlist_widget *widget, const Eina_List *file_list);
  50.  
  51. /**
  52. *@brief Update genlist widget
  53. *@param[in] widget Widget object.
  54. *@return Error code. RESULT_TYPE_OK if operation success.
  55. */
  56. int genlist_widget_update(genlist_widget *widget);
  57.  
  58. /**
  59. *@brief Clear genlist
  60. *@param[in] widget Widget object.
  61. */
  62. void genlist_widget_clear(genlist_widget *widget);
  63.  
  64. #endif /*GENLIST_H_ */