2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://floralicense.org/license/
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.
20 /*******************************************************************
24 *****************************************************************/
26 /* extern QP_Module searchbar; */
27 #ifdef QP_MINICTRL_ENABLE
28 extern QP_Module minictrl;
29 #endif /* QP_MINICTRL_ENABLE */
31 #ifdef QP_BRIGHTNESS_ENABLE
33 extern QP_Module brightness_ctrl;
34 #endif /* QP_BRIGHTNESS_ENABLE */
36 extern QP_Module noti;
37 extern QP_Module ticker;
38 extern QP_Module ticker_status;
40 extern QP_Module idletxt;
42 static QP_Module *modules[] = {
43 #ifdef QP_MINICTRL_ENABLE
45 #endif /* QP_MINICTRL_ENABLE */
46 #ifdef QP_BRIGHTNESS_ENABLE
48 #endif /* QP_BRIGHTNESS_ENABLE */
55 int init_modules(void *data)
59 retif(data == NULL, QP_FAIL, "Invalid parameter!");
61 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
63 modules[i]->init(data);
69 int fini_modules(void *data)
73 retif(data == NULL, QP_FAIL, "Invalid parameter!");
75 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
77 modules[i]->fini(data);
83 int suspend_modules(void *data)
87 retif(data == NULL, QP_FAIL, "Invalid parameter!");
89 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
90 if (modules[i]->suspend)
91 modules[i]->suspend(data);
97 int resume_modules(void *data)
101 retif(data == NULL, QP_FAIL, "Invalid parameter!");
103 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
104 if (modules[i]->resume)
105 modules[i]->resume(data);
111 int hib_enter_modules(void *data)
115 retif(data == NULL, QP_FAIL, "Invalid parameter!");
117 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
118 if (modules[i]->hib_enter)
119 modules[i]->hib_enter(data);
125 int hib_leave_modules(void *data)
129 retif(data == NULL, QP_FAIL, "Invalid parameter!");
131 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
132 if (modules[i]->hib_leave)
133 modules[i]->hib_leave(data);
139 /******************************************************************
143 ****************************************************************/
145 void lang_change_modules(void *data)
148 retif(data == NULL, , "Invalid parameter!");
150 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
151 if (modules[i]->lang_changed)
152 modules[i]->lang_changed(data);
156 void refresh_modules(void *data)
159 retif(data == NULL, , "Invalid parameter!");
161 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
162 if (modules[i]->refresh)
163 modules[i]->refresh(data);
167 /******************************************************************
169 * Quickpanel open/close Events
171 ****************************************************************/
172 int qp_opened_modules(void *data)
176 retif(data == NULL, QP_FAIL, "Invalid parameter!");
178 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
179 if (modules[i]->qp_opened)
180 modules[i]->qp_opened(data);
186 int qp_closed_modules(void *data)
190 retif(data == NULL, QP_FAIL, "Invalid parameter!");
192 for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
193 if (modules[i]->qp_closed)
194 modules[i]->qp_closed(data);