Initialize Tizen 2.3
[framework/base/syspopup.git] / include / syspopup_core.h
1 /*
2  * syspopup
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7  * Jaeho Lee <jaeho81.lee@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22
23
24 #ifndef __SYSPOPUP_CORE_H__
25 #define __SYSPOPUP_CORE_H__
26
27 #include <glib.h>
28 #include <bundle.h>
29 #include "syspopup_db.h"
30
31 #define SYSPOPUP_DEFAULT_TIMEOUT 20     /* sec */
32
33 struct _syspopup {
34         int id;
35         char *name;
36         int (*def_term_fn) (bundle *, void *);
37         int (*def_timeout_fn) (bundle *, void *);
38         guint timeout_id;
39         def_term_action_t term_act;
40         def_endkey_action_t endkey_act;
41         void *user_data;
42         void *internal_data;
43         void *win;
44         int (*rotate_cb) (void *, void *, void *);
45         bundle *dupped_bundle;
46         struct _syspopup *next;
47 };
48
49 typedef struct _syspopup syspopup;
50
51 syspopup *_syspopup_get_head();
52 int _syspopup_add_new(syspopup *pinfo);
53 syspopup *_syspopup_find(const char *name);
54 syspopup *_syspopup_find_by_id(int id);
55 void _syspopup_del(int id);
56
57 int _syspopup_init(void (*term_handler) (void *),
58                    gboolean(*timeout_handler) (void *));
59 int _syspopup_reset_timeout(syspopup *sp, syspopup_info_t *info);
60 int _syspopup_set_term_type(syspopup *sp, syspopup_info_t *info);
61 int _syspopup_set_endkey_type(syspopup *sp, syspopup_info_t *info);
62
63 const char *_syspopup_get_name_from_bundle(bundle *b);
64 int _syspopup_set_name_to_bundle(bundle *b, char *popup_name);
65
66 #endif
67