summaryrefslogtreecommitdiff
path: root/src/edje_externals/elm_fileselector.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-23 20:08:10 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-23 22:36:41 +0900
commit46c51ecec7d886cf079e197840b158a396a20e83 (patch)
treefe1f59c37c8c197b8ca80821e0b34fd58671ee29 /src/edje_externals/elm_fileselector.c
parentfd5a62d31d50bf9ba60f2b4c55c05f7117c6622d (diff)
edje_externals: Fixed formatting before working on it.
Diffstat (limited to 'src/edje_externals/elm_fileselector.c')
-rw-r--r--src/edje_externals/elm_fileselector.c157
1 files changed, 80 insertions, 77 deletions
diff --git a/src/edje_externals/elm_fileselector.c b/src/edje_externals/elm_fileselector.c
index 37754222c..6884fd13e 100644
--- a/src/edje_externals/elm_fileselector.c
+++ b/src/edje_externals/elm_fileselector.c
@@ -1,5 +1,4 @@
1#include <assert.h> 1#include <assert.h>
2
3#include "private.h" 2#include "private.h"
4 3
5typedef struct _Elm_Params_Fileselector 4typedef struct _Elm_Params_Fileselector
@@ -16,7 +15,9 @@ typedef struct _Elm_Params_Fileselector
16} Elm_Params_Fileselector; 15} Elm_Params_Fileselector;
17 16
18static void 17static void
19external_fileselector_state_set(void *data EINA_UNUSED, Evas_Object *obj, const void *from_params, const void *to_params, float pos EINA_UNUSED) 18external_fileselector_state_set(void *data EINA_UNUSED, Evas_Object *obj,
19 const void *from_params, const void *to_params,
20 float pos EINA_UNUSED)
20{ 21{
21 const Elm_Params_Fileselector *p; 22 const Elm_Params_Fileselector *p;
22 23
@@ -35,39 +36,40 @@ external_fileselector_state_set(void *data EINA_UNUSED, Evas_Object *obj, const
35} 36}
36 37
37static Eina_Bool 38static Eina_Bool
38external_fileselector_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param) 39external_fileselector_param_set(void *data EINA_UNUSED, Evas_Object *obj,
40 const Edje_External_Param *param)
39{ 41{
40 if (!strcmp(param->name, "save")) 42 if (!strcmp(param->name, "save"))
41 { 43 {
42 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 44 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
43 { 45 {
44 elm_fileselector_is_save_set(obj, param->i); 46 elm_fileselector_is_save_set(obj, param->i);
45 return EINA_TRUE; 47 return EINA_TRUE;
46 } 48 }
47 } 49 }
48 else if (!strcmp(param->name, "folder only")) 50 else if (!strcmp(param->name, "folder only"))
49 { 51 {
50 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 52 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
51 { 53 {
52 elm_fileselector_folder_only_set(obj, param->i); 54 elm_fileselector_folder_only_set(obj, param->i);
53 return EINA_TRUE; 55 return EINA_TRUE;
54 } 56 }
55 } 57 }
56 else if (!strcmp(param->name, "show buttons")) 58 else if (!strcmp(param->name, "show buttons"))
57 { 59 {
58 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 60 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
59 { 61 {
60 elm_fileselector_buttons_ok_cancel_set(obj, param->i); 62 elm_fileselector_buttons_ok_cancel_set(obj, param->i);
61 return EINA_TRUE; 63 return EINA_TRUE;
62 } 64 }
63 } 65 }
64 else if (!strcmp(param->name, "expandable")) 66 else if (!strcmp(param->name, "expandable"))
65 { 67 {
66 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 68 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
67 { 69 {
68 elm_fileselector_expandable_set(obj, param->i); 70 elm_fileselector_expandable_set(obj, param->i);
69 return EINA_TRUE; 71 return EINA_TRUE;
70 } 72 }
71 } 73 }
72 74
73 ERR("unknown parameter '%s' of type '%s'", 75 ERR("unknown parameter '%s' of type '%s'",
@@ -77,39 +79,40 @@ external_fileselector_param_set(void *data EINA_UNUSED, Evas_Object *obj, const
77} 79}
78 80
79static Eina_Bool 81static Eina_Bool
80external_fileselector_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param) 82external_fileselector_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
83 Edje_External_Param *param)
81{ 84{
82 if (!strcmp(param->name, "save")) 85 if (!strcmp(param->name, "save"))
83 { 86 {
84 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 87 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
85 { 88 {
86 param->i = elm_fileselector_is_save_get(obj); 89 param->i = elm_fileselector_is_save_get(obj);
87 return EINA_TRUE; 90 return EINA_TRUE;
88 } 91 }
89 } 92 }
90 else if (!strcmp(param->name, "folder only")) 93 else if (!strcmp(param->name, "folder only"))
91 { 94 {
92 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 95 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
93 { 96 {
94 param->i = elm_fileselector_folder_only_get(obj); 97 param->i = elm_fileselector_folder_only_get(obj);
95 return EINA_TRUE; 98 return EINA_TRUE;
96 } 99 }
97 } 100 }
98 else if (!strcmp(param->name, "show buttons")) 101 else if (!strcmp(param->name, "show buttons"))
99 { 102 {
100 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 103 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
101 { 104 {
102 param->i = elm_fileselector_buttons_ok_cancel_get(obj); 105 param->i = elm_fileselector_buttons_ok_cancel_get(obj);
103 return EINA_TRUE; 106 return EINA_TRUE;
104 } 107 }
105 } 108 }
106 else if (!strcmp(param->name, "expandable")) 109 else if (!strcmp(param->name, "expandable"))
107 { 110 {
108 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 111 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
109 { 112 {
110 param->i = elm_fileselector_expandable_get(obj); 113 param->i = elm_fileselector_expandable_get(obj);
111 return EINA_TRUE; 114 return EINA_TRUE;
112 } 115 }
113 } 116 }
114 117
115 ERR("unknown parameter '%s' of type '%s'", 118 ERR("unknown parameter '%s' of type '%s'",
@@ -131,33 +134,34 @@ external_fileselector_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA
131 134
132 EINA_LIST_FOREACH(params, l, param) 135 EINA_LIST_FOREACH(params, l, param)
133 { 136 {
134 if (!strcmp(param->name, "save")) 137 if (!strcmp(param->name, "save"))
135 { 138 {
136 mem->is_save = !!param->i; 139 mem->is_save = !!param->i;
137 mem->is_save_set = EINA_TRUE; 140 mem->is_save_set = EINA_TRUE;
138 } 141 }
139 else if (!strcmp(param->name, "folder only")) 142 else if (!strcmp(param->name, "folder only"))
140 { 143 {
141 mem->folder_only = !!param->i; 144 mem->folder_only = !!param->i;
142 mem->folder_only_set = EINA_TRUE; 145 mem->folder_only_set = EINA_TRUE;
143 } 146 }
144 else if (!strcmp(param->name, "show buttons")) 147 else if (!strcmp(param->name, "show buttons"))
145 { 148 {
146 mem->show_buttons = !!param->i; 149 mem->show_buttons = !!param->i;
147 mem->show_buttons_set = EINA_TRUE; 150 mem->show_buttons_set = EINA_TRUE;
148 } 151 }
149 else if (!strcmp(param->name, "expandable")) 152 else if (!strcmp(param->name, "expandable"))
150 { 153 {
151 mem->expandable = !!param->i; 154 mem->expandable = !!param->i;
152 mem->expandable_set = EINA_TRUE; 155 mem->expandable_set = EINA_TRUE;
153 } 156 }
154 } 157 }
155 158
156 return mem; 159 return mem;
157} 160}
158 161
159static Evas_Object *external_fileselector_content_get(void *data EINA_UNUSED, 162static Evas_Object *external_fileselector_content_get(void *data EINA_UNUSED,
160 const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED) 163 const Evas_Object *obj EINA_UNUSED,
164 const char *content EINA_UNUSED)
161{ 165{
162 ERR("No content."); 166 ERR("No content.");
163 return NULL; 167 return NULL;
@@ -171,15 +175,14 @@ external_fileselector_params_free(void *params)
171} 175}
172 176
173static Edje_External_Param_Info external_fileselector_params[] = 177static Edje_External_Param_Info external_fileselector_params[] =
174 { 178{
175 DEFINE_EXTERNAL_COMMON_PARAMS, 179 DEFINE_EXTERNAL_COMMON_PARAMS,
176 EDJE_EXTERNAL_PARAM_INFO_BOOL("save"), 180 EDJE_EXTERNAL_PARAM_INFO_BOOL("save"),
177 EDJE_EXTERNAL_PARAM_INFO_BOOL("folder only"), 181 EDJE_EXTERNAL_PARAM_INFO_BOOL("folder only"),
178 EDJE_EXTERNAL_PARAM_INFO_BOOL("show buttons"), 182 EDJE_EXTERNAL_PARAM_INFO_BOOL("show buttons"),
179 EDJE_EXTERNAL_PARAM_INFO_BOOL("expandable"), 183 EDJE_EXTERNAL_PARAM_INFO_BOOL("expandable"),
180 EDJE_EXTERNAL_PARAM_INFO_SENTINEL 184 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
181 }; 185};
182 186
183DEFINE_EXTERNAL_ICON_ADD(fileselector, "fileselector") 187DEFINE_EXTERNAL_ICON_ADD(fileselector, "fileselector");
184DEFINE_EXTERNAL_TYPE_SIMPLE(fileselector, "File Selector") 188DEFINE_EXTERNAL_TYPE_SIMPLE(fileselector, "Fileselector");
185