Update codes for TIZEN 2.0
[apps/home/memo.git] / include / memo.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 __MEMO_APP_H__
20 #define __MEMO_APP_H__
21
22 #include <appcore-efl.h>
23 #include <Elementary.h>
24 #include <memo-assist.h>
25 #include <memo_string.h>
26 #include <gravel.h>
27 #include <supplement.h>
28 #include <extended-elm.h>
29 #include <memo-genlist.h>
30
31 #define MEMO_GROUP_NAME_MAX     128 /**< max length for group name */
32 #define MEMO_MAX_RECORD         400
33
34 #define MAX_REALIZED_RECORD     8
35
36 #define DEFAULT_FONT_SIZE       32
37
38 #define AUL_PARAM_ID       "__AUL_PARAM_ID"
39 #define MEMO_NAVIFRAME_ITEM_PREV_BTN "prev_btn"
40
41 typedef enum {
42     MEMO_VIEW_NULL = 0,
43     MEMO_LIST_VIEW,
44     MEMO_DETAIL_VIEW,
45     MEMO_EDIT_VIEW,
46     MEMO_EDIT_LIST_VIEW,
47     MEMO_VIEWS,
48 } memo_view_type_t;
49
50 typedef struct __appdata {
51     Evas *evas;
52     Evas_Object *win_main;
53     Evas_Object *ly_main;    /* window */
54     Evas_Object *navigator;
55
56     /* add more variables here */
57     memo_view_type_t init_view;
58     int index;        /* index of last clicked memo */
59     int index_detail;    /* for temporarily usage only */
60     char buf[MEMO_BUFFER_SIZE];    /* for temporarily usage only */
61     char *init_str;
62     Evas_Object *popup; /* popup when data modified by external app(kies) */
63 } appdata;
64
65 void *memo_load_list_view(appdata *ad);
66 void *memo_load_edit_view(appdata *ad);
67 void *memo_load_edit_list_view(appdata *ad);
68 void *memo_load_detail_view(appdata *ad);
69
70 void *memo_load_list_viewer(Evas_Object *parent, Evas_Object *win, service_h service, Memo_Component_Callback cb, void *data);
71 void memo_clear_list_viewer(void *h_lv);
72 void memo_update_list_viewer(void *h_lv);
73 void memo_destroy_list_viewer(void *h_lv);
74 void memo_list_editor_share_records(void *h_le);
75 void memo_list_editor_delete_records(void *h_le);
76 void *memo_load_list_editor(Evas_Object *parent, Evas_Object *win, service_h service, Memo_Component_Callback cb, void *data);
77 void memo_destroy_list_editor(void *h_le);
78 void *memo_load_text_viewer(Evas_Object *parent, Evas_Object *win, int id, service_h service, Memo_Component_Callback cb, void *data);
79 void memo_destroy_text_viewer(void *h_tv);
80 void memo_text_viewer_share_record(void *h_tv);
81 void *memo_load_doodle_viewer(Evas_Object *parent, Evas_Object *win, int id, service_h service, Memo_Component_Callback cb, void *data);
82 void memo_destroy_doodle_viewer(void *h_dv);
83 void memo_doodle_viewer_pre_del(void *h_dv);
84 void memo_doodle_viewer_share_record(void *h_dv);
85 void memo_doodle_viewer_save(void *h_dv);
86 void memo_doodle_viewer_cancel(void *h_dv);
87
88 #endif                /* __MEMO_APP_H__ */