Piano / inc /

main-app.h

  1. /*
  2. * Copyright (c) 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. #include "view/window.h"
  22.  
  23. typedef struct
  24. {
  25. window_obj *win;
  26. Eina_List *buttonList;
  27. Ecore_Timer *timer;
  28. void *previous_button;
  29. }app_data;
  30.  
  31. /**
  32. * @brief Create application instance
  33. * @return Application instance on success, otherwise NULL
  34. */
  35. app_data *app_create();
  36.  
  37. /**
  38. * @brief Destroy application instance
  39. * @param[in] app application instance
  40. */
  41. void app_destroy(app_data *app);
  42.  
  43. /**
  44. * @brief Run Tizen application
  45. * @param[in] app application instance
  46. * @param[in] argc argc paremeter received in main
  47. * @param[in] argv argv parameter received in main
  48. */
  49. int app_run(app_data *app, int argc, char **argv);
  50.  
  51. #endif /* __MAIN_APP_H__ */
  52.