(Circle) Dialer / inc /

view.h

  1. /*
  2. * Copyright (c) 2015 Samsung Electronics Co., Ltd
  3. *
  4. * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
  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. #if !defined(_VIEW_H)
  18. #define _VIEW_H
  19.  
  20. #define EDJ_FILE "edje/main.edj"
  21. #define GRP_MAIN "main"
  22.  
  23. #define RADIUS_MIN 82
  24. #define CENTER_REF_X 180
  25. #define CENTER_REF_Y 180
  26.  
  27. /* Slope value for circular touch layer */
  28. #define SLOPE_36_DEGREE 0.7265
  29. #define SLOPE_72_DEGREE 3.0776
  30. #define SLOPE_108_DEGREE -3.0776
  31. #define SLOPE_144_DEGREE -0.7265
  32. #define SLOPE_180_DEGREE 0
  33.  
  34. #define DAIL_INPUT_MAX 128
  35.  
  36. /* Text Style for Dial Entry */
  37. #define DIAL_TEXT_STYLE_NORMAL "DEFAULT='font=Tizen:style=Light font_size=34 align=center'"
  38. #define DIAL_TEXT_STYLE_SMALL "DEFAULT='font=Tizen:style=Light font_size=28 align=center'"
  39. #define DIAL_TEXT_STYLE_SMALLER "DEFAULT='font=Tizen:style=Regular font_size=23 align=center'"
  40.  
  41. #define ENTRY_TEXT_MAX DAIL_INPUT_MAX
  42.  
  43. /* Entry text Control Option */
  44. #define ENTRY_TEXT_CLEAR_ALL 0
  45. #define ENTRY_TEXT_ADD_TEXT 1
  46. #define ENTRY_TEXT_BACKSPACE 2
  47.  
  48. #define LONGPRESS_TIME 0.5f
  49.  
  50. void view_create(void);
  51. Evas_Object *view_create_win(const char *pkg_name);
  52. Evas_Object *view_create_conformant_without_indicator(Evas_Object *win);
  53. Evas_Object *view_create_layout(Evas_Object *parent, const char *file_path, const char *group_name, Eext_Event_Cb cb_function, void *user_data);
  54. Evas_Object *view_create_layout_for_conformant(Evas_Object *parent, const char *file_path, const char *group_name, Eext_Event_Cb cb_function, void *user_data);
  55. Evas_Object *view_create_layout_by_theme(Evas_Object *parent, const char *class_name, const char *group_name, const char *style);
  56. void view_destroy(void);
  57. void view_set_image(Evas_Object *parent, const char *part_name, const char *image_path);
  58. void view_set_text(Evas_Object *parent, const char *part_name, const char *text);
  59. void view_set_color(Evas_Object *parent, const char *part_name, int r, int g, int b, int a);
  60. void view_set_button(Evas_Object *parent, const char *part_name, const char *style, const char *image_path, const char *text,
  61. Evas_Object_Event_Cb down_cb, Evas_Object_Event_Cb up_cb, Evas_Smart_Cb clicked_cb, void *user_data);
  62. Evas_Object *view_create_entry(Evas_Object *parent, const char *part_name, Evas_Smart_Cb clicked_cb, void *user_data);
  63.  
  64. Evas_Object *view_dialer_create_rectangle(void);
  65. void view_dialer_create(const char *file_path);
  66. int view_dialer_set_entry_text(int operation, const char *text);
  67. void view_dialer_set_entry(const char *part_name);
  68. Evas_Object *view_dialer_get_layout_object(void);
  69. #endif