Change calculator menu icon
[apps/home/calculator.git] / include / calc-view.h
1 /*
2 *
3 * Copyright 2012  Samsung Electronics Co., Ltd
4 *
5 * Licensed under the Flora License, Version 1.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *    http://www.tizenopensource.org/license
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #ifndef __DEF_CALC_VIEW_H_
20 #define __DEF_CALC_VIEW_H_
21
22 #include "calc-main.h"
23
24 /**
25 * @struct       history_item
26 * @brief        store the calculation history
27 */
28 struct history_item  {
29         char expression[MAX_EXPRESSION_LENGTH]; /**<Store the express in string format */
30         double result;  /**<Store the calculate result in double format */
31 };
32
33 /**
34 * @describe
35 *
36 *
37 * @param    ad
38 * @return    void
39 * @exception
40 */
41 void calc_view_load(struct appdata *ad);
42
43 /**
44 * @describe
45 *
46 *
47 * @param    ad
48 * @return    void
49 * @exception
50 */
51 void calc_view_load_in_idle(struct appdata *ad);
52
53 /**
54 * @describe
55 *
56 *
57 * @param    ad
58 * @return    void
59 * @exception
60 */
61 void calc_view_revise_input_scroller(struct appdata *ad);
62
63 /**
64 * @describe
65 *
66 *
67 * @param    result
68 * @param    ad
69 * @return    void
70 * @exception
71 */
72 //void calc_view_show_result(const char *result, struct appdata *ad, int font_size);
73 void calc_view_show_result(const char *result, struct appdata *ad);
74
75
76 /**
77 * @describe
78 *
79 *
80 * @param    entry
81 * @return    int
82 * @exception
83 */
84 int calc_view_cursor_get_position(Evas_Object * entry);
85
86 /**
87 * @describe
88 *
89 *
90 * @param    entry
91 * @param    pos
92 * @return    void
93 * @exception
94 */
95 void calc_view_cursor_set_position(Evas_Object * entry, int pos);
96
97 /**
98 * @describe
99 *
100 *
101 * @param    entry
102 * @param    pos
103 * @return    void
104 * @exception
105 */
106 void calc_view_save_history(struct history_item item);
107
108 #endif  /* __DEF_CALC_VIEW_H_ */
109