File Manager / inc / view /

ctrl-bar-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 CTRL_BAR_VIEW_H_
  19. #define CTRL_BAR_VIEW_H_
  20.  
  21. #include "view/view.h"
  22. #include <Evas.h>
  23.  
  24. /**
  25. * @brief Control bar widget data
  26. */
  27. typedef struct {
  28. view_data *view; /**< Parent view */
  29.  
  30. Evas_Object *ctrl_bar; /**< Toolbar object */
  31. Evas_Object *ctxpopup; /**< Ctxpopup object */
  32. } ctrl_bar_widget;
  33.  
  34. /**
  35. * @brief Add new control bar widget to view
  36. * @param[in] view View object.
  37. * @return Control bar widget on success or NULL.
  38. */
  39. ctrl_bar_widget *ctrl_bar_widget_add(view_data *view);
  40.  
  41. /**
  42. * @brief Updates control bar and recreates buttons depending on mode
  43. * @param[in] widget Widget object.
  44. * @return Error code. RESULT_TYPE_OK if operation success.
  45. */
  46. int ctrl_bar_widget_mode_update(ctrl_bar_widget *widget);
  47.  
  48. /**
  49. * @brief Updates control bar buttons state
  50. * @param[in] widget Widget object.
  51. * @return Error code. RESULT_TYPE_OK if operation success.
  52. */
  53. int ctrl_bar_widget_state_update(ctrl_bar_widget *widget);
  54.  
  55. #endif /* CTRL_BAR_VIEW_H_ */