summaryrefslogtreecommitdiff
path: root/include/view/dialog_popup.h
blob: 97e07a432cb712f82947ce2e7d09a86e2aed301e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


#ifndef __AIR_MYFILES_DIALOG_POPUP_VIEW_H__
#define __AIR_MYFILES_DIALOG_POPUP_VIEW_H__

/* Sample code for creating a popup window

	dialog_popup_info_t sample_dialog;

	sample_dialog.dialog_popup_type = DIALOG_POPUP_TYPE_INPUT_NAME;
	sample_dialog.title = "SAMPLE TITLE";
	sample_dialog.content = "SAMPLE CONTENT";
	sample_dialog.button_1_text = "BUTTON 1";
	sample_dialog.button_2_text = "BUTTON 2";

	dialog_popup_create(priv->base, &sample_dialog);
*/

/* Definitions of macro or type */

/* Dialog popup types */
typedef enum _dialog_popup_type {
	DIALOG_POPUP_TYPE_YES_OR_CANCEL = 1,
	DIALOG_POPUP_TYPE_INPUT_NAME = 2,
	DIALOG_POPUP_TYPE_CONFIGURATION = 3,
	DIALOG_POPUP_TYPE_SUBMENU = 4,
	DIALOG_POPUP_TYPE_NOTIFY = 5,
	DIALOG_POPUP_TYPE_NOTIFY_NO_CLOSE = 6,
} dialog_popup_type_e;

typedef struct _dialog_popup_info_t {
	dialog_popup_type_e dialog_popup_type;
	char *title;
	char *content;
	char *button_1_text;
	char *button_2_text;
	void *data;

	Evas_Object *entry;
	/* Button event handler is required */
} dialog_popup_info_t;

/* Functions */
Evas_Object *dialog_popup_create(dialog_popup_info_t *dialog_popup_info);

#endif /* __AIR_MYFILES_DIALOG_POPUP_VIEW_H__ */