Tizen 2.1 base
[apps/core/preloaded/ug-camera-efl.git] / include / cam_popup.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://floralicense.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
18 #ifndef CAM_POPUP_H_
19 #define CAM_POPUP_H_
20
21 #include <Elementary.h>
22 #include <glib.h>
23
24 /* define USE_ELM_POPUP */
25 void cam_popup_remove(Evas_Object *popup);
26 void cam_popup_remove_all(void);
27
28 #ifdef USE_ELM_POPUP
29 typedef void (*cam_popup_respons_cb) (void *user_data, Evas_Object *obj,
30                                       void *event_info);
31
32 /* popup with one button,  ELM_POPUP_RESPONSE_OK is sent along with response signal. */
33 void cam_popup_confirm_add(Evas_Object *window, const char *message,
34                            const char *btn_name, cam_popup_respons_cb callback,
35                            void *user_data);
36
37 /* popup with two button, ELM_POPUP_RESPONSE_OK/ELM_POPUP_RESPONSE_CANCEL is sent along with response signal. */
38 void cam_popup_question_add(Evas_Object *window, const char *message,
39                             const char *btn_n_1, const char *btn_n_2,
40                             cam_popup_respons_cb callback, void *user_data);
41
42 #else
43
44 /* popup with one button */
45 void
46 cam_popup_confirm_add(Evas_Object *window, const char *message,
47                       const char *btn_name,
48                       void (*btn_cb) (void *data, Evas_Object *obj,
49                                       void *event_info));
50
51 /* popup with two button */
52 void
53 cam_popup_question_add(Evas_Object *window, const char *message,
54                        const char *lbtn_name,
55                        void (*left_btn_cb) (void *data, Evas_Object *obj,
56                                             void *event_info),
57                        const char *rbtn_name, void (*right_btn_cb) (void *data,
58                                                                     Evas_Object
59                                                                     *obj,
60                                                                     void
61                                                                     *event_info));
62
63 Evas_Object *cam_popup_guide_screen_add(Evas_Object *window,
64                                         const char *message);
65
66 #endif
67
68 gboolean cam_popup_create(void *data);
69 gboolean cam_popup_add_progress_bar(void *data);
70 gboolean cam_popup_set_text(void *data, char *text);
71 gboolean cam_popup_set_bar_value(void *data, double value);
72 gboolean cam_popup_delete(void *data);
73 void cam_popup_rotate(void *data);
74 gboolean cam_popup_for_burst_create(void *data);
75
76 #endif