2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://www.tizenopensource.org/license
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.
17 #ifndef __MEMO_ASSIST_H__
18 #define __MEMO_ASSIST_H__
22 #include <memo_string.h>
24 #define DOODLE_TITLE_PREFIX "Draw_"
26 #define ARGB_JOIN(a, r, g, b) \
27 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
29 #define IN_RECT_CHECK(x, y, rx, ry, rw, rh)\
30 (((unsigned)((x) - (rx)) < (rw)) && ((unsigned)((y) - (ry)) < (rh)))
32 #define CLIP_RECT_TO_RECT(x, y, w, h, rx, ry, rw, rh)\
37 _t1 = MIN(x + w, (rx) + (rw));\
41 _t1 = MIN(y + h, (ry) + (rh));\
46 typedef void (*Memo_Component_Callback)(void *data, const char *msg, void *event);
48 typedef struct memo_data memo_data_t;
49 typedef struct memo_data_list memo_data_list_t;
51 char * strcasestr (const char *haystack, const char *needle);
52 char * strptime (const char *s, const char *fmt, struct tm *tp);
54 char *memo_get_doodle_title();
55 void memo_time_format(char *buf, int len, time_t time);
56 time_t memo_get_binary_release_date();
57 void memo_com_dummy_cb(void *data, const char *msg, void *event);
58 void memo_create_yes_no_popup(Evas_Object *win, const char *msg, Evas_Smart_Cb on_yes, Evas_Smart_Cb on_no, void *data);
59 void memo_tool_btn_focus_set(Evas_Object *eo, Eina_Bool status);
60 void *memo_load_font_size_selector(Evas_Object *parent, bundle *bd, Memo_Component_Callback cb, void *data);
61 void memo_del_font_size_selector(void *h_fss);
62 void *memo_load_color_selector(Evas_Object *parent, bundle *bd, Memo_Component_Callback cb, void *data);
63 void memo_del_color_selector(void *h_cs);
64 void *memo_load_pencil_size_selector(Evas_Object *parent, bundle *bd, Memo_Component_Callback cb, void *data);
65 void memo_del_pencil_size_selector(void *h_pss);
66 Eina_Bool memo_black_theme_check();
67 void memo_navigator_pop(Evas_Object *navi);
68 Elm_Object_Item *memo_naviframe_item_push(Evas_Object *obj, const char *title_label,
69 Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style);
70 Evas_Object *memo_controlbar_add(Evas_Object *parent);
72 #endif /* __MEMO_ASSIST_H__ */