File Manager / inc / utils /

ui-utils.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 UI_UTILS_H_
  19. #define UI_UTILS_H_
  20.  
  21. #include <Evas.h>
  22. #include <efl_extension.h>
  23.  
  24. struct _app_data;
  25.  
  26. /**
  27. * @brief Adds a new Naviframe object to the parent.
  28. * @param[in] parent Parent object
  29. * @param[in] back_cb The function to be called when the back button event is triggered.
  30. * @param[in] cb_data The data pointer to be passed to @p back_cb.
  31. * @return Naviframe object on success or NULL.
  32. */
  33. Evas_Object *ui_utils_navi_add(Evas_Object *parent, Eext_Event_Cb back_cb, void *cb_data);
  34.  
  35. /**
  36. * @brief Adds a new Layout object to the parent.
  37. * @param[in] parent Parent object
  38. * @param[in] destroy_cb The function to be called when object is deleted
  39. * @return Layout object on success or NULL.
  40. */
  41. Evas_Object *ui_utils_layout_add(Evas_Object *parent, Evas_Object_Event_Cb destroy_cb, void *cb_data);
  42.  
  43. /**
  44. * @brief Adds a new genlist object to the parent.
  45. * @param[in] parent Parent object
  46. * @param[in] destroy_cb The function to be called when object is deleted
  47. * @param[in] cb_data The data pointer to be passed to @p destroy_cb.
  48. * @return Genlist object on success or NULL.
  49. */
  50. Evas_Object *ui_utils_genlist_add(Evas_Object *parent, Evas_Object_Event_Cb destroy_cb, void *cb_data);
  51.  
  52. /**
  53. * @brief Returns title dependent on current path.
  54. * @param[in] curr_path The current path.
  55. * @return Title for current path.
  56. */
  57. const char *ui_utils_title_get(const char* curr_path);
  58.  
  59. /**
  60. * @brief Returns full path to the resource file by its name
  61. * @param[in] res_name Name of the resource
  62. * @return Full path to the resource file. NULL if fails.
  63. */
  64. const char *ui_utils_get_resource(const char *res_name);
  65.  
  66. #endif /* UI_UTILS_H_ */