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