Tizen 2.0 Release
[apps/core/preloaded/ug-image-viewer-efl.git] / main / src / include / ivug-name-view.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 #ifndef __IVUG_NAME_VIEW_H__
18 #define __IVUG_NAME_VIEW_H__
19
20 #include "ivug-common.h"
21 #include "ivug-media.h"
22
23 typedef enum {
24         NAME_VIEW_RESPONSE_OK,
25         NAME_VIEW_RESPONSE_CANCEL,
26 } ivug_name_response;
27
28 typedef void (*FNResponse)(ivug_name_response resp, const char *string, void *pClientData);
29
30 typedef struct _Ivug_NameView
31 {
32         Evas_Object *bg;
33         Evas_Object *layout;
34         Evas_Object *content;
35
36         Evas_Object *navibar;
37
38         Evas_Object *editfield;
39         Evas_Object *entry;
40         Evas_Object *btn_done;
41
42         FNResponse fnresponse;
43         void *clientdata;
44
45 } Ivug_NameView;
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
51 Ivug_NameView *
52 ivug_name_view_create(Evas_Object *parent, const char *title);
53
54 void
55 ivug_name_view_set_title(Ivug_NameView *pNameView, const char *title);
56
57 void
58 ivug_name_view_set_entry(Ivug_NameView *pNameView, const char *str);
59
60 void
61 ivug_name_view_set_response_callback(Ivug_NameView *pNameView, FNResponse resp, void *data);
62
63 void
64 ivug_name_view_destroy(Ivug_NameView *pNameView);
65
66 Evas_Object *
67 ivug_name_view_object_get(Ivug_NameView *pNameView);
68
69 void
70 ivug_name_view_set_focus(Ivug_NameView *pNameView);
71
72 void
73 ivug_name_view_set_max_length(Ivug_NameView *pNameView, int max_len);
74
75 #ifdef __cplusplus
76 }
77 #endif
78
79 #endif  // __IVUG_NAME_VIEW_H__
80
81