From 9e00acbbbf6155ef2bf6420065198d4197a1fb8d Mon Sep 17 00:00:00 2001 From: Hyungdeuk Kim Date: Wed, 26 Jun 2013 11:33:04 +0900 Subject: rollback overlap feature for image viewer --- include/ui-gadget.h | 5 +++++ src/manager.c | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/include/ui-gadget.h b/include/ui-gadget.h index ceabcee..7ff338d 100755 --- a/include/ui-gadget.h +++ b/include/ui-gadget.h @@ -128,9 +128,14 @@ enum ug_option { UG_OPT_INDICATOR_MANUAL = 0x04, /**< Indicator option: Indicator will be handled manually */ + UG_OPT_OVERLAP_ENABLE = 0x08, + /**< Overlap option: Enable indicator overlap */ UG_OPT_MAX }; +#define GET_OPT_INDICATOR_VAL(opt) opt % UG_OPT_OVERLAP_ENABLE +#define GET_OPT_OVERLAP_VAL(opt) opt & UG_OPT_OVERLAP_ENABLE + #define UG_SERVICE_DATA_RESULT "__UG_SEND_REUSLT__" /** diff --git a/src/manager.c b/src/manager.c index 27de462..b458f16 100755 --- a/src/manager.c +++ b/src/manager.c @@ -369,6 +369,24 @@ static int ugman_ug_resume(void *data) return 0; } +static int ugman_indicator_overlap_update(enum ug_option opt) +{ + if (!ug_man.win) { + _ERR("indicator update failed: no window"); + return -1; + } + + if(GET_OPT_OVERLAP_VAL(opt)) { + _DBG("update overlap indicator / opt(%d)", opt); + elm_object_signal_emit(ug_man.conform, "elm,state,indicator,overlap", ""); + } else { + _DBG("update no overlap indicator / opt(%d)", opt); + elm_object_signal_emit(ug_man.conform, "elm,state,indicator,nooverlap", ""); + } + + return 0; +} + static int ugman_indicator_update(enum ug_option opt, enum ug_event event) { int enable; @@ -378,7 +396,7 @@ static int ugman_indicator_update(enum ug_option opt, enum ug_event event) _DBG("indicator update opt(%d) cur_state(%d)", opt, cur_state); - switch (opt) { + switch (GET_OPT_INDICATOR_VAL(opt)) { case UG_OPT_INDICATOR_ENABLE: if (event == UG_EVENT_NONE) enable = 1; @@ -415,6 +433,7 @@ static int ugman_ug_getopt(ui_gadget_h ug) /* Indicator Option */ if (ug->mode == UG_MODE_FULLVIEW) { + ugman_indicator_overlap_update(ug->opt); ugman_indicator_update(ug->opt, UG_EVENT_NONE); } -- cgit v1.2.3