summaryrefslogtreecommitdiff
path: root/mobile/lock-setting/lockscreen-options/src
diff options
context:
space:
mode:
Diffstat (limited to 'mobile/lock-setting/lockscreen-options/src')
-rwxr-xr-xmobile/lock-setting/lockscreen-options/src/lockscreen-options-main.c343
-rwxr-xr-xmobile/lock-setting/lockscreen-options/src/lockscreen-options-util.c148
-rwxr-xr-xmobile/lock-setting/lockscreen-options/src/lockscreen-options.c213
3 files changed, 0 insertions, 704 deletions
diff --git a/mobile/lock-setting/lockscreen-options/src/lockscreen-options-main.c b/mobile/lock-setting/lockscreen-options/src/lockscreen-options-main.c
deleted file mode 100755
index 2ede565..0000000
--- a/mobile/lock-setting/lockscreen-options/src/lockscreen-options-main.c
+++ /dev/null
@@ -1,343 +0,0 @@
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-
-
-#include <vconf.h>
-#include <vconf-keys.h>
-#include <ui-gadget.h>
-#include <ui-gadget-module.h>
-#include <ail.h>
-
-#include "lockscreen-options.h"
-#include "lockscreen-options-debug.h"
-#include "lockscreen-options-main.h"
-#include "lockscreen-options-util.h"
-
-#include "starter-vconf.h"
-
-#define LOCKSCREEN_OPTOINS_GENLIST_ITEM_CNT 5
-
-typedef struct {
- int glStyle;
- int stringId;
- Evas_Object *check;
- void (*func) (void *data, Evas_Object * obj, void *event_info);
-} lockscreen_menu_item_info;
-
-static lockscreen_menu_item_info lockscreen_options_menu_item[] = {
- {ENUM_LOCKSCREEN_GENLIST_STYLE_1TEXT1ICON, IDS_LOCKSCREEN_OPTIONS_EVENT_NOTIFICATIONS, NULL, NULL},
- {ENUM_LOCKSCREEN_GENLIST_STYLE_HELP, IDS_LOCKSCREEN_OPTIONS_EVENT_NOTIFICATIONS_HELP, NULL, NULL},
- {ENUM_LOCKSCREEN_GENLIST_STYLE_1TEXT1ICON, IDS_LOCKSCREEN_OPTIONS_CLOCK, NULL, NULL},
- {ENUM_LOCKSCREEN_GENLIST_STYLE_1TEXT1ICON, IDS_LOCKSCREEN_OPTIONS_HELPTEXT, NULL, NULL},
- {ENUM_LOCKSCREEN_GENLIST_STYLE_HELP, IDS_LOCKSCREEN_OPTIONS_HELPTEXT_HELP, NULL, NULL}
-};
-
-static Elm_Gen_Item_Class itc_menu_1text1icon;
-static Elm_Gen_Item_Class itc_menu_2text1icon;
-static Elm_Gen_Item_Class itc_help_1text;
-
-static void _lockscreen_options_main_back_cb(void *data, Evas_Object * obj,
- void *event_info)
-{
- lockscreen_options_ug_data *ug_data =
- (lockscreen_options_ug_data *) data;
-
- if (ug_data == NULL)
- return;
-
- ug_destroy_me(ug_data->ug);
-}
-
-static char *_lockscreen_options_main_gl_label_get(void *data,
- Evas_Object * obj,
- const char *part)
-{
- if (data == NULL || part == NULL)
- return NULL;
-
- lockscreen_menu_item_info *lockoption_data =
- (lockscreen_menu_item_info *) data;
-
- if ((strcmp(part, "elm.text") == 0) ||
- (strcmp(part, "elm.text.1") == 0)) {
- return
- strdup(lockscreen_optoins_get_string
- (lockoption_data->stringId));
- }
-
- return NULL;
-
-}
-
-static void _lockscreen_options_set_menu_status(int stringId, int value)
-{
- int ret = 0;
- switch (stringId) {
- case IDS_LOCKSCREEN_OPTIONS_EVENT_NOTIFICATIONS:
- ret = vconf_set_bool(VCONFKEY_LOCKSCREEN_EVENT_NOTIFICATION_DISPLAY, value);
- break;
- case IDS_LOCKSCREEN_OPTIONS_CLOCK:
- ret = vconf_set_bool(VCONFKEY_LOCKSCREEN_CLOCK_DISPLAY, value);
- break;
- case IDS_LOCKSCREEN_OPTIONS_HELPTEXT:
- ret = vconf_set_bool(VCONFKEY_LOCKSCREEN_HELP_TEXT_DISPLAY, value);
- break;
- default:
- LOCKOPTIONS_DBG("NO VALID STRINGID %d", stringId);
- break;
- }
-}
-
-static bool _lockscreen_options_get_menu_status(int stringId)
-{
- int status = 0;
- int ret = 0;
-
- switch (stringId) {
- case IDS_LOCKSCREEN_OPTIONS_EVENT_NOTIFICATIONS:
- ret = vconf_get_bool(VCONFKEY_LOCKSCREEN_EVENT_NOTIFICATION_DISPLAY, &status);
- break;
- case IDS_LOCKSCREEN_OPTIONS_CLOCK:
- ret = vconf_get_bool(VCONFKEY_LOCKSCREEN_CLOCK_DISPLAY, &status);
- break;
- case IDS_LOCKSCREEN_OPTIONS_HELPTEXT:
- ret = vconf_get_bool(VCONFKEY_LOCKSCREEN_HELP_TEXT_DISPLAY, &status);
- break;
- default:
- LOCKOPTIONS_DBG("NO VALID INDEX %d", stringId);
- break;
- }
-
- if (ret == -1) {
- LOCKOPTIONS_ERR("Failed to get vconfkey %d!", stringId);
- return 0;
- }
-
- LOCKOPTIONS_DBG
- ("_lockscreen_options_get_menu_status index %d Status %d", stringId,
- status);
-
- return status;
-}
-
-static void _lockscreen_options_check_changed_cb(void *data, Evas_Object * obj,
- void *event_info)
-{
- if (data == NULL || obj == NULL)
- return;
-
- lockscreen_menu_item_info *lockoption_data =
- (lockscreen_menu_item_info *) data;
-
- Eina_Bool ret;
- int value = 0;
-
- ret = elm_check_state_get(obj);
-
- LOCKOPTIONS_DBG("_lockscreen_options_check_changed_cb : %s",
- ret == EINA_TRUE ? "ON" : "OFF");
-
- if (ret == EINA_TRUE) {
- value = 1;
- } else {
- value = 0;
- }
-
- _lockscreen_options_set_menu_status(lockoption_data->stringId, value);
-}
-
-static Evas_Object *_lockscreen_options_main_gl_icon_get(void *data,
- Evas_Object * obj,
- const char *part)
-{
- if (data == NULL || obj == NULL)
- return NULL;
-
- lockscreen_menu_item_info *lockoption_data =
- (lockscreen_menu_item_info *) data;
-
- LOCKOPTIONS_DBG("icon get stringId : %d", lockoption_data->stringId);
-
- Evas_Object *check;
- int value = 0;
-
- check = elm_check_add(obj);
- elm_object_style_set(check, "on&off");
- evas_object_show(check);
-
- value = _lockscreen_options_get_menu_status(lockoption_data->stringId);
- elm_check_state_set(check, value);
-
- evas_object_pass_events_set(check, 1);
- evas_object_propagate_events_set(check, 0);
-
- evas_object_smart_callback_add(check, "changed",
- _lockscreen_options_check_changed_cb,
- lockoption_data);
-
- lockoption_data->check = check;
-
- return check;
-}
-
-static void _lockscreen_options_main_gl_del(void *data, Evas_Object * obj)
-{
- LOCKOPTIONS_DBG("_lockscreen_options_main_gl_del");
-}
-
-static void _lockscreen_options_main_gl_sel(void *data, Evas_Object * obj,
- void *event_info)
-{
- if (data == NULL)
- return;
-
- lockscreen_menu_item_info *lockoption_data = NULL;
-
- elm_genlist_item_selected_set((Elm_Object_Item *) event_info,
- EINA_FALSE);
-
- Elm_Object_Item *item = (Elm_Object_Item *) event_info;
- lockoption_data =
- (lockscreen_menu_item_info *) elm_object_item_data_get(item);
- if (lockoption_data == NULL) {
- return;
- }
-
- if (lockoption_data->stringId ==
- IDS_LOCKSCREEN_OPTIONS_EVENT_NOTIFICATIONS
- || lockoption_data->stringId == IDS_LOCKSCREEN_OPTIONS_CLOCK
- || lockoption_data->stringId == IDS_LOCKSCREEN_OPTIONS_HELPTEXT) {
- Eina_Bool check_state =
- elm_check_state_get(lockoption_data->check);
- _lockscreen_options_set_menu_status(lockoption_data->stringId,
- !check_state);
- elm_genlist_item_update(item);
- }
-
- if (lockoption_data->func != NULL) {
- lockoption_data->func(data, obj, event_info);
- }
-}
-
-static void _lockscreen_options_create_gl_item(Elm_Gen_Item_Class * item,
- int glStyle)
-{
- if (glStyle == ENUM_LOCKSCREEN_GENLIST_STYLE_1TEXT1ICON) {
- item->item_style = LOCKSCREEN_GENLIST_STYLE_1TEXT1ICON;
- item->func.text_get = _lockscreen_options_main_gl_label_get;
- item->func.content_get = _lockscreen_options_main_gl_icon_get;
- item->func.state_get = NULL;
- item->func.del = _lockscreen_options_main_gl_del;
- } else if (glStyle == ENUM_LOCKSCREEN_GENLIST_STYLE_2TEXT1ICON) {
- item->item_style = LOCKSCREEN_GENLIST_STYLE_2TEXT1ICON;
- item->func.text_get = _lockscreen_options_main_gl_label_get;
- item->func.content_get = _lockscreen_options_main_gl_icon_get;
- item->func.state_get = NULL;
- item->func.del = NULL;
- } else if (glStyle == ENUM_LOCKSCREEN_GENLIST_STYLE_HELP) {
- item->item_style = LOCKSCREEN_GENLIST_STYLE_HELP;
- item->func.text_get = _lockscreen_options_main_gl_label_get;
- item->func.content_get = NULL;
- item->func.state_get = NULL;
- item->func.del = _lockscreen_options_main_gl_del;
- } else {
- LOCKOPTIONS_DBG("_lockscreen_options_create_gl_item FAIL\n");
- }
-}
-
-void lockscreen_options_main_create_view(lockscreen_options_ug_data * ug_data)
-{
- LOCKOPTIONS_DBG("lockscreen_options_main_create_view begin\n");
-
- Evas_Object *navi_bar = ug_data->navi_bar;
- Evas_Object *back_button = NULL;
- Evas_Object *genlist = NULL;
- Elm_Object_Item *item = NULL;
- int i = 0;
-
- if (navi_bar == NULL) {
- LOCKOPTIONS_WARN("navi_bar is null.");
- return;
- }
-
- _lockscreen_options_create_gl_item(&(itc_menu_1text1icon),
- ENUM_LOCKSCREEN_GENLIST_STYLE_1TEXT1ICON);
- _lockscreen_options_create_gl_item(&(itc_menu_2text1icon),
- ENUM_LOCKSCREEN_GENLIST_STYLE_2TEXT1ICON);
- _lockscreen_options_create_gl_item(&(itc_help_1text),
- ENUM_LOCKSCREEN_GENLIST_STYLE_HELP);
-
- genlist = elm_genlist_add(navi_bar);
-
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
-
- lockscreen_options_util_create_seperator(genlist);
-
- for (i = 0; i < LOCKSCREEN_OPTOINS_GENLIST_ITEM_CNT; i++) {
- Elm_Gen_Item_Class *itc = NULL;
- if (lockscreen_options_menu_item[i].glStyle ==
- ENUM_LOCKSCREEN_GENLIST_STYLE_1TEXT1ICON) {
- itc = &(itc_menu_1text1icon);
- elm_genlist_item_append(genlist,
- itc,
- &
- (lockscreen_options_menu_item
- [i]), NULL,
- ELM_GENLIST_ITEM_NONE,
- _lockscreen_options_main_gl_sel,
- ug_data);
- } else if(lockscreen_options_menu_item[i].glStyle ==
- ENUM_LOCKSCREEN_GENLIST_STYLE_2TEXT1ICON) {
- itc = &(itc_menu_2text1icon);
- elm_genlist_item_append(genlist,
- itc,
- &
- (lockscreen_options_menu_item
- [i]), NULL,
- ELM_GENLIST_ITEM_NONE,
- _lockscreen_options_main_gl_sel,
- ug_data);
- } else if (lockscreen_options_menu_item[i].glStyle ==
- ENUM_LOCKSCREEN_GENLIST_STYLE_HELP) {
- itc = &(itc_help_1text);
- item = elm_genlist_item_append(genlist,
- itc,
- &
- (lockscreen_options_menu_item
- [i]), NULL,
- ELM_GENLIST_ITEM_NONE,
- NULL, NULL);
- elm_genlist_item_select_mode_set(item,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- if(i != (LOCKSCREEN_OPTOINS_GENLIST_ITEM_CNT - 1)){
- lockscreen_options_util_create_underline(genlist);
- }
- } else {
- LOCKOPTIONS_WARN("lockscreen option has no such type.");
- return;
- }
- }
-
- back_button = elm_button_add(navi_bar);
- elm_object_style_set(back_button, "naviframe/back_btn/default");
- evas_object_smart_callback_add(back_button, "clicked",
- _lockscreen_options_main_back_cb,
- ug_data);
-
- elm_naviframe_item_push(navi_bar, _("IDS_ST_BODY_LOCK_SCREEN") , back_button, NULL, genlist, NULL);
-}
diff --git a/mobile/lock-setting/lockscreen-options/src/lockscreen-options-util.c b/mobile/lock-setting/lockscreen-options/src/lockscreen-options-util.c
deleted file mode 100755
index 6f0b84c..0000000
--- a/mobile/lock-setting/lockscreen-options/src/lockscreen-options-util.c
+++ /dev/null
@@ -1,148 +0,0 @@
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-
-
-#include "lockscreen-options-debug.h"
-#include "lockscreen-options.h"
-#include "lockscreen-options-util.h"
-
-const char *sys_str_table[] = {
- "IDS_COM_SK_OK",
- "IDS_COM_SK_CANCEL",
-};
-
-const char *app_str_table[] = {
- "IDS_IDLE_MBODY_EVENT_NOTIFICATIONS",
- "IDS_IDLE_BODY_VIEW_EVENT_NOTIFICATIONS_ON_THE_LOCK_SCREEN",
- "IDS_ST_BODY_CLOCK",
- "IDS_IM_BODY_HELP_TEXT",
- "IDS_ST_BODY_SHOW_HELP_TEXT_ON_LOCK_SCREEN"
-};
-
-static Elm_Gen_Item_Class itc_underline;
-static Elm_Gen_Item_Class itc_separator;
-
-Evas_Object *lockscreen_options_util_create_navigation(Evas_Object * parent)
-{
- Evas_Object *navi_bar = NULL;
-
- if (parent == NULL) {
- LOCKOPTIONS_WARN("Parent is null.");
- return NULL;
- }
-
- navi_bar = elm_naviframe_add(parent);
- if (navi_bar == NULL) {
- LOCKOPTIONS_ERR("Cannot add naviagtionbar.");
- return NULL;
- }
-
- elm_object_part_content_set(parent, "elm.swallow.content", navi_bar);
-
- evas_object_show(navi_bar);
-
- return navi_bar;
-}
-
-Evas_Object *lockscreen_options_util_create_layout(Evas_Object * parent,
- const char *file,
- const char *group)
-{
- Evas_Object *layout = NULL;
-
- if (parent == NULL) {
- LOCKOPTIONS_WARN("Parent is null.");
- return NULL;
- }
-
- layout = elm_layout_add(parent);
- if (layout == NULL) {
- LOCKOPTIONS_ERR("Cannot add layout.");
- return NULL;
- }
-
- if ((file != NULL) && (group != NULL)) {
- elm_layout_file_set(layout, file, group);
- }
-
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
-
- evas_object_show(layout);
-
- return layout;
-}
-
-void lockscreen_options_util_create_seperator(Evas_Object * genlist)
-{
- if (NULL == genlist)
- return;
-
- Elm_Object_Item *item = NULL;
-
- itc_separator.item_style = LOCKSCREEN_GENLIST_STYLE_SEPERATOR;
- itc_separator.func.text_get = NULL;
- itc_separator.func.content_get = NULL;
- itc_separator.func.state_get = NULL;
- itc_separator.func.del = NULL;
-
- item =
- elm_genlist_item_append(genlist, &(itc_separator), NULL, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(item,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-}
-
-void lockscreen_options_util_create_underline(Evas_Object * genlist)
-{
- if (NULL == genlist)
- return;
-
- Elm_Object_Item *item = NULL;
-
- itc_underline.item_style = LOCKSCREEN_GENLIST_STYLE_UNDERLINE;
- itc_underline.func.text_get = NULL;
- itc_underline.func.content_get = NULL;
- itc_underline.func.state_get = NULL;
- itc_underline.func.del = NULL;
-
- item =
- elm_genlist_item_append(genlist, &(itc_underline), NULL, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(item,
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-}
-
-char *lockscreen_optoins_get_string(int id)
-{
- LOCKOPTIONS_DBG("get string id : %d\n", id);
-
- char *str = NULL;
-
- if (id < IDS_LOCKSCREEN_OPTIONS_SYSTEM_STRING_MAX) {
- str = dgettext("sys_string", sys_str_table[id]);
- } else {
- str =
- dgettext(PKGNAME,
- app_str_table[id -
- IDS_LOCKSCREEN_OPTIONS_SYSTEM_STRING_MAX]);
- }
-
- LOCKOPTIONS_DBG("get string : %s\n", str);
-
- return str;
-}
diff --git a/mobile/lock-setting/lockscreen-options/src/lockscreen-options.c b/mobile/lock-setting/lockscreen-options/src/lockscreen-options.c
deleted file mode 100755
index de5eb00..0000000
--- a/mobile/lock-setting/lockscreen-options/src/lockscreen-options.c
+++ /dev/null
@@ -1,213 +0,0 @@
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 UG_MODULE_API
-#define UG_MODULE_API __attribute__ ((visibility("default")))
-#endif
-
-#include <Elementary.h>
-#include <ui-gadget-module.h>
-
-#include "lockscreen-options.h"
-#include "lockscreen-options-util.h"
-#include "lockscreen-options-main.h"
-
-static Evas_Object *create_bg(Evas_Object * parent)
-{
- Evas_Object *bg = elm_bg_add(parent);
-
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- elm_object_style_set(bg, "group_list");
-
- elm_object_part_content_set(parent, "elm.swallow.bg", bg);
- evas_object_show(bg);
-
- return bg;
-}
-
-static Evas_Object *create_fullview(Evas_Object * parent,
- lockscreen_options_ug_data * ug_data)
-{
- Evas_Object *base = NULL;
- Evas_Object *navi_bar = NULL;
-
- base = lockscreen_options_util_create_layout(parent, NULL, NULL);
-
- elm_layout_theme_set(base, "layout", "application", "default");
- elm_win_resize_object_add(parent, base);
-
- elm_win_indicator_mode_set(parent, ELM_WIN_INDICATOR_SHOW);
-
- create_bg(base);
-
- navi_bar = lockscreen_options_util_create_navigation(base);
- ug_data->navi_bar = navi_bar;
-
- lockscreen_options_main_create_view(ug_data);
-
- return base;
-}
-
-static Evas_Object *create_frameview(Evas_Object * parent,
- lockscreen_options_ug_data * ug_data)
-{
- Evas_Object *base = NULL;
-
- return base;
-}
-
-static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service,
- void *priv)
-{
- Evas_Object *parent = NULL;
- Evas_Object *win_main = NULL;
- lockscreen_options_ug_data *ug_data = NULL;
-
- if (!ug || !priv)
- return NULL;
-
- bindtextdomain(PKGNAME, "/usr/ug/res/locale");
-
- ug_data = priv;
- ug_data->ug = ug;
-
- parent = ug_get_parent_layout(ug);
- if (!parent)
- return NULL;
-
- win_main = ug_get_window();
- if (!win_main) {
- return NULL;
- }
-
- ug_data->win_main = win_main;
-
- if (mode == UG_MODE_FULLVIEW)
- ug_data->base = create_fullview(parent, ug_data);
- else
- ug_data->base = create_frameview(parent, ug_data);
-
- return ug_data->base;
-}
-
-static void on_start(ui_gadget_h ug, service_h service, void *priv)
-{
-}
-
-static void on_pause(ui_gadget_h ug, service_h service, void *priv)
-{
-
-}
-
-static void on_resume(ui_gadget_h ug, service_h service, void *priv)
-{
-
-}
-
-static void on_destroy(ui_gadget_h ug, service_h service, void *priv)
-{
- lockscreen_options_ug_data *ug_data;
-
- if (!ug || !priv)
- return;
-
- ug_data = priv;
- evas_object_del(ug_data->base);
- ug_data->base = NULL;
-}
-
-static void on_message(ui_gadget_h ug, service_h msg, service_h service,
- void *priv)
-{
-}
-
-static void on_event(ui_gadget_h ug, enum ug_event event, service_h service,
- void *priv)
-{
- switch (event) {
- case UG_EVENT_LOW_MEMORY:
- break;
- case UG_EVENT_LOW_BATTERY:
- break;
- case UG_EVENT_LANG_CHANGE:
- break;
- case UG_EVENT_ROTATE_PORTRAIT:
- break;
- case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
- break;
- case UG_EVENT_ROTATE_LANDSCAPE:
- break;
- case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
- break;
- default:
- break;
- }
-}
-
-static void on_key_event(ui_gadget_h ug, enum ug_key_event event,
- service_h service, void *priv)
-{
- if (!ug)
- return;
-
- switch (event) {
- case UG_KEY_EVENT_END:
- ug_destroy_me(ug);
- break;
- default:
- break;
- }
-}
-
-UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
-{
- lockscreen_options_ug_data *ug_data;
-
- if (!ops)
- return -1;
-
- ug_data = calloc(1, sizeof(lockscreen_options_ug_data));
- if (!ug_data)
- return -1;
-
- ops->create = on_create;
- ops->start = on_start;
- ops->pause = on_pause;
- ops->resume = on_resume;
- ops->destroy = on_destroy;
- ops->message = on_message;
- ops->event = on_event;
- ops->key_event = on_key_event;
- ops->priv = ug_data;
- ops->opt = UG_OPT_INDICATOR_ENABLE;
-
- return 0;
-}
-
-UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
-{
- lockscreen_options_ug_data *ug_data;
-
- if (!ops)
- return;
-
- ug_data = ops->priv;
- if (ug_data)
- free(ug_data);
-}