fix: Remove a strong theme dependency for the application layout.
[apps/core/preloaded/calculator.git] / include / calc-view.h
1 /*
2 *
3 * Copyright 2012  Samsung Electronics Co., Ltd
4 *
5 * Licensed under the Flora License, Version 1.1 (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://floralicense.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 * When window changed between phone and monitor
56 *
57 * @param[in]    data    The callback data
58 * @param[in]    obj     The object which register callback
59 * @param[in]    event_info      The event info which occured
60 * @return    void
61 * @exception
62 */
63 void win_profile_changed_cb(void *data, Evas_Object * obj, void *event_info);
64
65 /**
66 * @describe
67 *
68 *
69 * @param    ad
70 * @return    void
71 * @exception
72 */
73 void  calc_view_revise_history_scroller(struct appdata *ad);
74
75 /**
76 * @describe
77 *
78 *
79 * @param    ad
80 * @return    void
81 * @exception
82 */
83 void calc_view_revise_input_scroller(struct appdata *ad);
84
85 /**
86 * @describe
87 *
88 *
89 * @param    result
90 * @param    ad
91 * @return    void
92 * @exception
93 */
94 //void calc_view_show_result(const char *result, struct appdata *ad, int font_size);
95 void calc_view_show_result(const char *result, struct appdata *ad);
96
97
98 /**
99 * @describe
100 *
101 *
102 * @param    entry
103 * @return    int
104 * @exception
105 */
106 int calc_view_cursor_get_position(Evas_Object * entry);
107
108 /**
109 * @describe
110 *
111 *
112 * @param    entry
113 * @param    pos
114 * @return    void
115 * @exception
116 */
117 void calc_view_cursor_set_position(Evas_Object * entry, int pos);
118
119 /**
120 * @describe
121 *
122 *
123 * @param    entry
124 * @param    pos
125 * @return    void
126 * @exception
127 */
128 void calc_view_save_history(struct history_item *item);
129
130 void calc_view_show_histroy(Evas_Object *entry);
131 #endif  /* __DEF_CALC_VIEW_H_ */
132