--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ug-calendar-picker-efl CXX)
+
+SET(SRCS
+ src/CalendarPickerView.cpp
+ src/CalendarPickerGadget.cpp
+)
+
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ ui-gadget
+ elementary
+ dlog
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+# set flags
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -g")
+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
+SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+ ADD_DEFINITIONS("-DTARGET")
+ MESSAGE("add -DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+# set extra defines
+SET(IMAGES_DIR "/opt/ug/res/images/ug-calendar-picker-efl")
+SET(EDJ_NAME "/opt/ug/res/edje/ug-calendar-picker-efl/ug-calendar-picker-efl.edj")
+SET(THEME_EDJ "/opt/ug/res/edje/ug-calendar-picker-efl/ug-calendar-picker-efl_theme.edj")
+SET(PACKAGE "libug-calendar-picker-efl")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DIMAGES_DIR=\"${IMAGES_DIR}\"")
+ADD_DEFINITIONS("-DEDJ_NAME=\"${EDJ_NAME}\"")
+ADD_DEFINITIONS("-DTHEME_EDJ=\"${THEME_EDJ}\"")
+ADD_DEFINITIONS(-DLOG_TAG=\"ug-calendar-picker-efl\")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+# make gadget lib
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_CUSTOM_TARGET(ug-calendar-picker-efl.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/ug-calendar-picker-efl.edc ${CMAKE_BINARY_DIR}/ug-calendar-picker-efl.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/ug-calendar-picker-efl.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} ug-calendar-picker-efl.edj)
+
+ADD_CUSTOM_TARGET(ug-calendar-picker-efl_theme.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/ug-calendar-picker-efl_theme.edc ${CMAKE_BINARY_DIR}/ug-calendar-picker-efl_theme.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/ug-calendar-picker-efl_theme.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} ug-calendar-picker-efl_theme.edj)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /opt/ug/lib)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/ug-calendar-picker-efl.edj DESTINATION /opt/ug/res/edje/${PROJECT_NAME})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/ug-calendar-picker-efl_theme.edj DESTINATION /opt/ug/res/edje/${PROJECT_NAME})
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/images/ DESTINATION ${IMAGES_DIR}
+ FILES_MATCHING
+ PATTERN "*.png"
+)
+
+# install desktop file & icon
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+CONFIGURE_FILE(${PROJECT_NAME}.desktop.in ${PROJECT_NAME}.desktop)
+
+# i18n
+ADD_SUBDIRECTORY(po)
+
--- /dev/null
+ug-calendar-picker-efl (0.0.4-0) unstable; urgency=low
+
+ * Git: pkgs/u/ug-calendar-picker
+ * Tag: ug-calendar-picker-efl_0.0.4-0
+
+ * efl migration is applied
+
+ -- Sangpyo Kim <sangpyo7.kim@samsung.com> Fri, 16 Mar 2012 15:44:58 +0900
+
+ug-calendar-picker-efl (0.0.3-0) unstable; urgency=low
+
+ * Git: pkgs/u/ug-calendar-picker
+ * Tag: ug-calendar-picker-efl_0.0.3-0
+
+ * Apply ELM migration to ug-calendar-picker-efl
+
+ -- Eunjoong Jeon <ez.jeon@samsung.com> Fri, 17 Feb 2012 14:17:05 +0900
+
+ug-calendar-picker-efl (0.0.2-0) unstable; urgency=low
+
+ * Git: pkgs/u/ug-calendar-picker
+ * Tag: ug-calendar-picker-efl_0.0.2-0
+
+ * Remove ug-1 related code.
+
+ -- Hyerim Bae <hyerim.bae@samsung.com> Mon, 26 Dec 2011 16:28:46 +0900
+
+ug-calendar-picker-efl (0.0.1-0) unstable; urgency=low
+
+ * Git: pkgs/u/ug-calendar-picker
+ * Tag: ug-calendar-picker-efl_0.0.1-0
+
+ * initial release
+
+ -- Sangpyo Kim <sangpyo7.kim@samsung.com> Wed, 07 Dec 2011 12:02:43 +0900
--- /dev/null
+Source: ug-calendar-picker-efl
+Section: devel
+Priority: extra
+Maintainer: Hyerim Bae <hyerim.bae@samsung.com>, Inbum Chang <ibchang@samsung.com>, Junghwan Kang<junghwan.kang@samsung.com>, Sangpyo Kim<sangpyo7.kim@samsung.com>
+Uploaders: JungHwan Kang <junghwan.kang@samsung.com>, Sangpyo Kim <sangpyo7.kim@samsung.com>, Hyerim Bae <hyerim.bae@samsung.com>, Inbum Chang <ibchang@samsung.com>
+Build-Depends: debhelper (>= 5), libui-gadget-dev, libelm-dev, dlog-dev
+Standards-Version: 3.7.2
+
+Package: libug-calendar-picker-efl
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Picker Public Shared-Gadget with EFL
+
+Package: libug-calendar-picker-efl-dbg
+Section: debug
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libug-calendar-picker-efl(= ${Source-Version})
+Description: Picker Public Shared-Gadget with EFL (unstripped)
+
--- /dev/null
+usr/bin
+usr/sbin
--- /dev/null
+CMakeCache.txt
+CMakeLists.txt
--- /dev/null
+/opt/ug/lib/*
+/opt/ug/res/*
--- /dev/null
+#!/bin/sh
+# Change file permissions
+ # shared gadget
--- /dev/null
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS ?= -Wall
+CXXFLAGS ?= -Wall
+LDFLAGS ?=
+PREFIX ?= /usr
+DATADIR ?= /opt
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+ CXXFLAGS += -O0
+else
+ CFLAGS += -O2
+ CXXFLAGS += -O2
+endif
+
+CFLAGS += -fPIC
+CXXFLAGS += -fPIC
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX)
+
+ touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+
+ for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+ cat $$f > $${f%.in}; \
+ sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+ sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+ done
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) clean
+ rm -rf CMakeCache.txt
+ rm -rf CMakeFiles
+ rm -rf cmake_install.cmake
+ rm -rf Makefile
+ rm -rf install_manifest.txt
+
+ rm -rf po/CMakeCache.txt
+ rm -rf po/CMakeFiles
+ rm -rf po/cmake_install.cmake
+ rm -rf po/Makefile
+ rm -rf po/install_manifest.txt
+
+ rm -rf *.so
+ rm -rf *.edj
+ rm -rf *.desktop
+
+ for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+ rm -f $${f%.in}; \
+ done
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/wavplayer.
+ $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_install --list-missing --sourcedir=debian/tmp
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip --dbg-package=libug-calendar-picker-efl-dbg
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- /dev/null
+%define _optdir /opt
+%define _ugdir %{_optdir}/ug
+
+
+Name: ug-calendar-picker-efl
+Summary: Picker Public Shared-Gadget with EFL
+Version: 0.0.3
+Release: 0
+Group: TO_BE/FILLED_IN
+License: Samsung Proprietary License
+Source0: %{name}-%{version}.tar.gz
+BuildRequires: cmake
+BuildRequires: edje-tools
+BuildRequires: gettext-tools
+BuildRequires: pkgconfig(ui-gadget)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Description: Picker Public Shared-Gadget with EFL
+
+%prep
+%setup -q
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=%{_ugdir}
+
+make %{?jobs:-j%jobs}
+
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%files
+%defattr(-,root,root,-)
+%{_ugdir}/res/images/ug-calendar-picker-efl/*
+%{_ugdir}/res/edje/ug-calendar-picker-efl/ug-calendar-picker-efl.edj
+%{_ugdir}/res/edje/ug-calendar-picker-efl/ug-calendar-picker-efl_theme.edj
+%{_ugdir}/res/locale/*/LC_MESSAGES/*
+%{_ugdir}/lib/libug-calendar-picker-efl.so
--- /dev/null
+# for i18n
+
+SET(POFILES en_US.po en_GB.po ja.po ko.po zh_CN.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE("PO: ${pofile}")
+ GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+ SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${moFile}
+ COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+ DEPENDS ${absPofile}
+ )
+ INSTALL(FILES ${moFile}
+ DESTINATION /opt/ug/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
--- /dev/null
+# List of source files containing translatable strings.
+src/CalendarPickerView.cpp
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-19 10:39+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/PickerView.cpp:133
+msgid "IDS_COM_SK_DONE"
+msgstr ""
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-19 10:39+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/PickerView.cpp:133
+msgid "IDS_COM_SK_DONE"
+msgstr ""
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-19 10:39+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/PickerView.cpp:133
+msgid "IDS_COM_SK_DONE"
+msgstr ""
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-19 10:39+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/PickerView.cpp:133
+msgid "IDS_COM_SK_DONE"
+msgstr ""
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-05-19 13:54+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#:
+msgid "Application template"
+msgstr ""
+
+#:
+msgid "Click to exit"
+msgstr ""
+
+#. ******************************************************************
+#. * Process internationalization for fixed text in the created edje layout
+#.
+#:
+msgid "FONT_NAME"
+msgstr ""
--- /dev/null
+#!/bin/sh
+
+PACKAGE=libug-calendar-picker-efl
+SRCROOT=..
+POTFILES=POTFILES.in
+
+#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW
+ALL_LINGUAS="en_US en_GB ja ko zh_CN"
+
+XGETTEXT=/usr/bin/xgettext
+MSGMERGE=/usr/bin/msgmerge
+
+echo -n "Make ${PACKAGE}.pot "
+if [ ! -e $POTFILES ] ; then
+ echo "$POTFILES not found"
+ exit 1
+fi
+
+$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \
+ --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES \
+&& test ! -f ${PACKAGE}.po \
+ || (rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot)
+
+if [ $? -ne 0 ]; then
+ echo "error"
+ exit 1
+else
+ echo "done"
+fi
+
+for LANG in $ALL_LINGUAS; do
+ echo "$LANG : "
+
+ if [ ! -e $LANG.po ] ; then
+ sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po
+ echo "${LANG}.po created"
+ else
+ if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then
+ if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
+ rm -f ${LANG}.new.po
+ else
+ if mv -f ${LANG}.new.po ${LANG}.po; then
+ echo ""
+ else
+ echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
+ rm -f ${LANG}.new.po
+ exit 1
+ fi
+ fi
+ else
+ echo "msgmerge for $LANG failed!"
+ rm -f ${LANG}.new.po
+ fi
+ fi
+ echo ""
+done
+
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-19 10:39+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/PickerView.cpp:133
+msgid "IDS_COM_SK_DONE"
+msgstr ""
--- /dev/null
+/*
+
+Copyright (c) 2000-2012 Samsung Electronics Co., Ltd All Rights Reserved
+
+This file is part of ug-calendar-picker
+Written by Eunjoong Jeon <ez.jeon@samsung.com>
+
+PROPRIETARY/CONFIDENTIAL
+
+This software is the confidential and proprietary information of
+SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
+disclose such Confidential Information and shall use it only in
+accordance with the terms of the license agreement you entered
+into with SAMSUNG ELECTRONICS.
+
+SAMSUNG make no representations or warranties about the suitability
+of the software, either express or implied, including but not limited
+to the implied warranties of merchantability, fitness for a particular
+purpose, or non-infringement. SAMSUNG shall not be liable for any
+damages suffered by licensee as a result of using, modifying or
+distributing this software or its derivatives.
+
+*/
+
+#ifndef UG_MODULE_API
+#define UG_MODULE_API __attribute__ ((visibility("default")))
+#endif
+
+#include <stdlib.h>
+#include <Elementary.h>
+#include <ui-gadget-module.h>
+#include <dlog.h>
+
+#include "CalendarPickerGadget.h"
+#include "CalendarPickerView.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+static Evas_Object *create_fullview(Evas_Object *parent, struct ug_data *ugd)
+{
+ Evas_Object *base;
+
+ /* Create Full view */
+ base = elm_layout_add(parent);
+ if (!base)
+ return NULL;
+ if (!elm_layout_theme_set(base, "standard", "window", "integration"))
+ SLOGE("Can not set layout theme[standard, window, integration]\n");
+ edje_object_signal_emit(_EDJ(base), "elm,state,show,indicator", "elm");
+ edje_object_signal_emit(_EDJ(base), "elm,state,show,content", "elm");
+
+ return base;
+
+}
+
+static Evas_Object *create_frameview(Evas_Object *parent, struct ug_data *ugd)
+{
+ Evas_Object *base;
+
+ /* Create Frame view */
+ base = elm_layout_add(parent);
+ if (!base)
+ return NULL;
+ if (!elm_layout_theme_set(base, "standard", "window", "integration"))
+ SLOGE("Can not set layout theme[standard, window, integration]\n");
+ edje_object_signal_emit(_EDJ(base), "elm,state,show,content", "elm");
+
+ return base;
+}
+
+static Evas_Object *create_content(Evas_Object *parent, struct ug_data *ugd, bundle *data)
+{
+ if(data)
+ {
+ const char* date = bundle_get_val(data, "date");
+ SLOGD("current date=%s", date);
+
+ ugd->view = new CalendarPickerView();
+ return ugd->view->createLayout(parent, ugd, date);
+ }
+
+ return NULL;
+}
+
+static void *on_create(struct ui_gadget *ug, enum ug_mode mode, bundle *data, void *priv)
+{
+ Evas_Object *parent;
+ Evas_Object *content;
+ struct ug_data *ugd;
+
+ if (!ug || !priv)
+ {
+ return NULL;
+ }
+ bindtextdomain("ug-calendar-picker-efl", "/opt/ug/res/locale");
+
+ ugd = (struct ug_data *)priv;
+ ugd->ug = ug;
+
+ parent = (Evas_Object *)ug_get_parent_layout(ug);
+ if (!parent)
+ {
+ return NULL;
+ }
+
+ if (mode == UG_MODE_FULLVIEW)
+ ugd->base = create_fullview(parent, ugd);
+ else
+ ugd->base = create_frameview(parent, ugd);
+
+ if (ugd->base) {
+ content = create_content(parent, ugd, data);
+ elm_object_part_content_set(ugd->base, "elm.swallow.content", content);
+ }
+
+ return ugd->base;
+}
+
+static void on_start(struct ui_gadget *ug, bundle *data, void *priv)
+{
+}
+
+static void on_pause(struct ui_gadget *ug, bundle *data, void *priv)
+{
+
+}
+
+static void on_resume(struct ui_gadget *ug, bundle *data, void *priv)
+{
+
+}
+
+static void on_destroy(struct ui_gadget *ug, bundle *data, void *priv)
+{
+ struct ug_data *ugd;
+
+ if (!ug || !priv)
+ return;
+
+ ugd = (struct ug_data *)priv;
+ evas_object_del(ugd->base);
+
+ ugd->base = NULL;
+
+ if(ugd->view)
+ delete ugd->view;
+}
+
+static void on_message(struct ui_gadget *ug, bundle *msg, bundle *data, void *priv)
+{
+}
+
+static void on_event(struct ui_gadget *ug, enum ug_event event, bundle *data, 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(struct ui_gadget *ug, enum ug_key_event event, bundle *data, void *priv)
+{
+ if (!ug)
+ return;
+ SLOGD("\nkey : %d", event);
+
+ switch (event) {
+ case UG_KEY_EVENT_END:
+ break;
+ default:
+ break;
+ }
+}
+
+UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
+{
+ struct ug_data *ugd;
+
+ if (!ops)
+ return -1;
+
+ ugd = (struct ug_data *)calloc(1, sizeof(struct ug_data));
+ if (!ugd)
+ 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 = ugd;
+ ops->opt = UG_OPT_INDICATOR_ENABLE;
+
+ return 0;
+}
+
+UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
+{
+ struct ug_data *ugd;
+
+ if (!ops)
+ return;
+
+ ugd = (struct ug_data *)ops->priv;
+ if (ugd)
+ free(ugd);
+}
+#ifdef __cplusplus
+}
+
+#endif /* __cplusplus */
--- /dev/null
+/*
+
+Copyright (c) 2000-2012 Samsung Electronics Co., Ltd All Rights Reserved
+
+This file is part of ug-calendar-picker
+Written by Eunjoong Jeon <ez.jeon@samsung.com>
+
+PROPRIETARY/CONFIDENTIAL
+
+This software is the confidential and proprietary information of
+SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
+disclose such Confidential Information and shall use it only in
+accordance with the terms of the license agreement you entered
+into with SAMSUNG ELECTRONICS.
+
+SAMSUNG make no representations or warranties about the suitability
+of the software, either express or implied, including but not limited
+to the implied warranties of merchantability, fitness for a particular
+purpose, or non-infringement. SAMSUNG shall not be liable for any
+damages suffered by licensee as a result of using, modifying or
+distributing this software or its derivatives.
+
+*/
+
+#ifndef __CALENDAR_PICKER_GADGET_H__
+#define __CALENDAR_PICKER_GADGET_H__
+
+#include <Elementary.h>
+#include <libintl.h>
+#include "CalendarPickerView.h"
+
+#define PKGNAME "ug-calendar-picker-efl"
+#define EDJ_PATH "/opt/ug/res/edje/ug-calendar-picker-efl"
+#if !defined(EDJ_NAME)
+#define EDJ_NAME EDJ_PATH"ug-calendar-picker-efl.edj"
+#endif
+#define IMAGE_DIR "/opt/ug/res/images/ug-calendar-picker-efl"
+
+#define _EDJ(o) elm_layout_edje_get(o)
+#define _(s) dgettext(PKGNAME, s)
+#define dgettext_noop(s) (s)
+#define N_(s) dgettext_noop(s)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+struct ug_data {
+ Evas_Object *base;
+ struct ui_gadget *ug;
+
+ CalendarPickerView *view;
+};
+
+enum
+{
+ CMD_NONE = 0,
+ CMD_DESTROY_SUCCESS = 1,
+ CMD_DESTROY_FAIL = 2,
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __CALENDAR_PICKER_GADGET_H__ */
--- /dev/null
+/*
+
+Copyright (c) 2000-2012 Samsung Electronics Co., Ltd All Rights Reserved
+
+This file is part of ug-calendar-picker
+Written by Eunjoong Jeon <ez.jeon@samsung.com>
+
+PROPRIETARY/CONFIDENTIAL
+
+This software is the confidential and proprietary information of
+SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
+disclose such Confidential Information and shall use it only in
+accordance with the terms of the license agreement you entered
+into with SAMSUNG ELECTRONICS.
+
+SAMSUNG make no representations or warranties about the suitability
+of the software, either express or implied, including but not limited
+to the implied warranties of merchantability, fitness for a particular
+purpose, or non-infringement. SAMSUNG shall not be liable for any
+damages suffered by licensee as a result of using, modifying or
+distributing this software or its derivatives.
+
+*/
+
+#include <bundle.h>
+#include <assert.h>
+#include <Elementary.h>
+#include <ui-gadget-module.h>
+#include <dlog.h>
+#include <string>
+
+#include "CalendarPickerView.h"
+#include "CalendarPickerGadget.h"
+
+CalendarPickerView::CalendarPickerView()
+ : parent(NULL),
+ ugd(NULL),
+ mCalendar(NULL),
+ mCalendarPickerLayout(NULL)
+{
+}
+
+CalendarPickerView::~CalendarPickerView()
+{
+ if(mCalendar)
+ {
+ evas_object_del(mCalendar);
+ mCalendar = NULL;
+ }
+
+ if(mCalendarPickerLayout)
+ {
+ evas_object_del(mCalendarPickerLayout);
+ mCalendarPickerLayout = NULL;
+ }
+}
+
+void CalendarPickerView::dateChangedCallback(void *data, Evas_Object *obj, void *event_info)
+{
+ SLOGD("%s", __func__);
+
+ CalendarPickerView* instance = (CalendarPickerView*)data;
+
+ if(instance == NULL)
+ {
+ SLOGD("[%s:%d]data is null!", __func__, __LINE__);
+ }
+
+ struct tm stime;
+ char tmp[12] = {0};
+
+ if (!elm_calendar_selected_time_get(obj, &stime))
+ return;
+
+ sprintf(tmp, "%d-%02d-%02d", stime.tm_year+1900, stime.tm_mon+1, stime.tm_mday);
+ SLOGD("selected date=%s", tmp);
+
+ bundle *b;
+
+ b = bundle_create();
+ if (bundle_add(b, "Date", tmp))
+ SLOGE("bundle_add is failed.\n");
+
+ if (ug_send_result(instance->ugd->ug, b))
+ SLOGE("ug_send_result is failed.\n");
+
+ if (bundle_free(b))
+ SLOGE("bundle_free is failed.\n");
+}
+
+void CalendarPickerView::prevButtonPressedCallback(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ CalendarPickerView* instance = (CalendarPickerView*)data;
+
+ if(instance == NULL)
+ {
+ SLOGD("[%s:%d]data is null!", __func__, __LINE__);
+ }
+
+ struct tm stime;
+ char tmp[12] = {0};
+
+ if (!elm_calendar_selected_time_get(instance->mCalendar, &stime))
+ return;
+ stime.tm_year = stime.tm_year - 1;
+ mktime(&stime);
+ elm_calendar_selected_time_set(instance->mCalendar, &stime);
+ sprintf(tmp, "%d-%02d-%02d", stime.tm_year+1900, stime.tm_mon+1, stime.tm_mday);
+ SLOGD("prev date=%s", tmp);
+
+ bundle *b;
+
+ b = bundle_create();
+ if (bundle_add(b, "Date", tmp))
+ SLOGE("bundle_add is failed.\n");
+ if (ug_send_result(instance->ugd->ug, b))
+ SLOGE("ug_send_result is failed.\n");
+
+ if (bundle_free(b))
+ SLOGE("bundle_free is failed.\n");
+}
+
+void CalendarPickerView::nextButtonPressedCallback(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ CalendarPickerView* instance = (CalendarPickerView*)data;
+
+ if(instance == NULL)
+ {
+ SLOGD("[%s:%d]data is null!", __func__, __LINE__);
+ }
+
+ struct tm stime;
+ char tmp[12] = {0};
+
+ if (!elm_calendar_selected_time_get(instance->mCalendar, &stime))
+ return;
+ stime.tm_year = stime.tm_year + 1;
+ mktime(&stime);
+ elm_calendar_selected_time_set(instance->mCalendar, &stime);
+ sprintf(tmp, "%d-%02d-%02d", stime.tm_year+1900, stime.tm_mon+1, stime.tm_mday);
+ SLOGD("next date=%s", tmp);
+
+ bundle *b;
+
+ b = bundle_create();
+ if (bundle_add(b, "Date", tmp))
+ SLOGE("bundle_add is failed.\n");
+ if (ug_send_result(instance->ugd->ug, b))
+ SLOGE("ug_send_result is failed.\n");
+
+ if (bundle_free(b))
+ SLOGE("bundle_free is failed.\n");
+}
+
+void CalendarPickerView::doneButtonPressedCallback(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ CalendarPickerView* instance = (CalendarPickerView*)data;
+
+ if(instance == NULL)
+ {
+ SLOGD("[%s:%d]data is null!", __func__, __LINE__);
+ }
+
+ bundle *b;
+
+ b = bundle_create();
+ if (bundle_add(b, "Result", "Done"))
+ SLOGE("bundle_add is failed.\n");
+ if (ug_send_result(instance->ugd->ug, b))
+ SLOGE("ug_send_result is failed.\n");
+
+ if (bundle_free(b))
+ SLOGE("bundle_free is failed.\n");
+
+ edje_object_signal_emit(_EDJ(instance->mCalendarPickerLayout), "calendar.hide", "hide");
+}
+
+Evas_Object* CalendarPickerView::createLayout(Evas_Object *obj, struct ug_data *data, const char* date)
+{
+ SLOGD("%s", __func__);
+ parent = obj;
+ ugd = data;
+
+ mCalendarPickerLayout = elm_layout_add(parent);
+ if (!elm_layout_file_set(mCalendarPickerLayout, EDJ_NAME, "calendar_picker"))
+ SLOGE("Can not set layout file[picker_view]\n");
+
+ evas_object_size_hint_weight_set(mCalendarPickerLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(mCalendarPickerLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_show(mCalendarPickerLayout);
+
+ mCalendar = elm_calendar_add(mCalendarPickerLayout);
+ evas_object_size_hint_weight_set(mCalendar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(mCalendar, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ if(date && strlen(date))
+ {
+ SLOGD("[%s:%d]date=%s", __func__, __LINE__, date);
+ struct tm stime;
+
+ if (!elm_calendar_selected_time_get(mCalendar, &stime))
+ {
+ SLOGD("[%s:%d]elm_calendar_selected_time_get failed", __func__, __LINE__);
+ }
+ SLOGD("[%s:%d]current %d-%d-%d\n", __func__, __LINE__, stime.tm_year, stime.tm_mon, stime.tm_mday);
+
+ std::string tempValue(date);
+ if (tempValue.length() !=10 || tempValue[4] != '-' || tempValue[7] != '-')
+ {
+ SLOGD("[%s:%d]date format error!", __func__, __LINE__);
+ }
+ else
+ {
+ std::string year = tempValue.substr(0, 4);
+ std::string month = tempValue.substr(5, 2);
+ std::string day = tempValue.substr(8, 2);
+
+ SLOGD("[%s:%d]y=%s, m=%s, day=%s", __func__, __LINE__, year.c_str(), month.c_str(), day.c_str());
+ stime.tm_year = atoi(year.c_str()) - 1900;
+ stime.tm_mon = atoi(month.c_str()) - 1;
+ stime.tm_mday = atoi(day.c_str());
+ SLOGD("[%s:%d]y=%d, m=%d, day=%d", __func__, __LINE__, stime.tm_year, stime.tm_mon, stime.tm_mday);
+ mktime(&stime);
+ elm_calendar_selected_time_set(mCalendar, &stime);
+ }
+ }
+
+ evas_object_show(mCalendar);
+ elm_object_part_content_set(mCalendarPickerLayout, "swallow.calendar", mCalendar);
+
+ evas_object_smart_callback_add(mCalendar, "changed", dateChangedCallback, (void*)this);
+
+ //for description of struct tm, refer C header file <time.h>
+ struct tm t_sat = { 0, 0, 12, 7, 0, 0, 6, 6, -1 };
+ elm_calendar_mark_add(mCalendar, "saturday", &t_sat, ELM_CALENDAR_WEEKLY);
+ struct tm t_sun = { 0, 0, 12, 1, 0, 0, 0, 0, -1 };
+ elm_calendar_mark_add(mCalendar, "sunday", &t_sun, ELM_CALENDAR_WEEKLY);
+ elm_calendar_marks_draw(mCalendar);
+
+ edje_object_part_text_set(elm_layout_edje_get(mCalendarPickerLayout), "btn_prev_text", "Prev.");
+ edje_object_part_text_set(elm_layout_edje_get(mCalendarPickerLayout), "btn_next_text", "Next");
+ edje_object_part_text_set(elm_layout_edje_get(mCalendarPickerLayout), "btn_done_text", "Done");
+
+ edje_object_signal_callback_add(_EDJ(mCalendarPickerLayout), "mouse,clicked,1", "btn_prev", prevButtonPressedCallback, (void*)this);
+ edje_object_signal_callback_add(_EDJ(mCalendarPickerLayout), "mouse,clicked,1", "btn_next", nextButtonPressedCallback, (void*)this);
+ edje_object_signal_callback_add(_EDJ(mCalendarPickerLayout), "mouse,clicked,1", "btn_done", doneButtonPressedCallback, (void*)this);
+
+ edje_object_signal_emit(_EDJ(mCalendarPickerLayout), "calendar.show", "show");
+ return mCalendarPickerLayout;
+}
+
--- /dev/null
+/*
+
+Copyright (c) 2000-2012 Samsung Electronics Co., Ltd All Rights Reserved
+
+This file is part of ug-calendar-picker
+Written by Eunjoong Jeon <ez.jeon@samsung.com>
+
+PROPRIETARY/CONFIDENTIAL
+
+This software is the confidential and proprietary information of
+SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
+disclose such Confidential Information and shall use it only in
+accordance with the terms of the license agreement you entered
+into with SAMSUNG ELECTRONICS.
+
+SAMSUNG make no representations or warranties about the suitability
+of the software, either express or implied, including but not limited
+to the implied warranties of merchantability, fitness for a particular
+purpose, or non-infringement. SAMSUNG shall not be liable for any
+damages suffered by licensee as a result of using, modifying or
+distributing this software or its derivatives.
+
+*/
+
+#ifndef CALENDAR_PICKER_VIEW_PICKER_VIEW_H_
+#define CALENDAR_PICKER_VIEW_PICKER_VIEW_H_
+
+#include <Elementary.h>
+
+class CalendarPickerView
+{
+ public:
+ CalendarPickerView();
+ ~CalendarPickerView();
+ private:
+ Evas_Object *parent;
+ struct ug_data *ugd;
+
+ Evas_Object* mCalendar;
+ Evas_Object* mCalendarPickerLayout;
+ public:
+ Evas_Object* createLayout(Evas_Object *obj, struct ug_data *data, const char* date);
+ static void dateChangedCallback(void *data, Evas_Object *obj, void *event_info);
+ static void prevButtonPressedCallback(void *data, Evas_Object *obj, const char *emission, const char *source);
+ static void nextButtonPressedCallback(void *data, Evas_Object *obj, const char *emission, const char *source);
+ static void doneButtonPressedCallback(void *data, Evas_Object *obj, const char *emission, const char *source);
+};
+
+#endif /* COMBO_BOX_PICKER_VIEW_H_ */
--- /dev/null
+Name=ug-calendar-picker-efl
+Type=Application
+Exec=ug-calendar-picker-efl
+Icon=icon_ug-calendar-picker-efl.png
+Network={True/False}
+X-SLP-Removable=False
+Comment=ug-calendar-picker-efl
--- /dev/null
+#define MAIN_W 480
+#define MAIN_H 800
+
+#include "ug-calendar-picker-efl_macro.edc"
+
+collections {
+ group {
+ name: "picker_view";
+ //min: MAIN_W MAIN_H;
+ images {
+ image: "00_calend_picker_panel.png" COMP;
+ image: "00_picker_bg_brown.png" COMP;
+ }
+
+ parts {
+ part { name: "background";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ color: 0 0 0 0;
+ }
+ }
+
+ part { name: "panel";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 0 66;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 0.0; to: background; }
+ rel2 { relative: 1.0 0.0; to: background; }
+ image.normal: "00_calend_picker_panel.png";
+ }
+ }
+
+ PADDING("padding.top", 0, 8, 0, 1, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 1.0, panel, panel)
+ PADDING("padding.left", 5, 0, 1, 0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 1.0, panel, panel)
+ PADDING("padding.right", 5, 0, 1, 0, 1.0, 0.0,
+ 0.0, 0.0, 1.0, 1.0, panel, panel)
+
+ part { name: "btn_prev";
+ type: SWALLOW;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ min: 98 50;
+ max: 98 50;
+ fixed: 1 1;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to_x:padding.left; to_y: padding.top; }
+ rel2 { relative: 1.0 1.0; to_x: padding.left; to_y: padding.top; }
+ }
+ }
+
+ PADDING("padding.btn_prev.right", 5, 0, 1, 0, 0.0, 0.0,
+ 1.0, 0.0, 1.0, 1.0, btn_prev, btn_prev)
+
+ part { name: "btn_next";
+ type: SWALLOW;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ min: 98 50;
+ max: 98 50;
+ fixed: 1 1;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to_x: padding.btn_prev.right; to_y: padding.top; }
+ rel2 { relative: 1.0 1.0; to_x: padding.btn_prev.right; to_y: padding.top; }
+ }
+ }
+
+ part { name: "btn_done";
+ type: SWALLOW;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ min: 98 50;
+ max: 98 50;
+ fixed: 1 1;
+ align: 1.0 0.0;
+ rel1 { relative: 0.0 1.0; to_x:padding.right; to_y: padding.top; }
+ rel2 { relative: 0.0 1.0; to_x: padding.right; to_y: padding.top; }
+ }
+ }
+
+ part { name: "separation_line";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 0 2;
+ max: 0 2;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ color: 104 97 92 255;
+ rel1 { relative: 0.0 1.0; to: panel; }
+ rel2 { relative: 1.0 1.0; to: panel; }
+ }
+ }
+
+ part { name: "list_bg";
+ type: IMAGE;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 1.0; to: separation_line; }
+ rel2 { relative: 1.0 1.0; to: background; }
+ image.normal: "00_picker_bg_brown.png";
+ }
+ }
+
+ part { name: "list_options";
+ type: SWALLOW;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 0.0; to: list_bg; }
+ rel2 { relative: 1.0 1.0; to: list_bg; }
+ }
+ }
+ }
+ }
+
+#define CAL_BTN_W 170
+#define CAL_BTN_H 100
+#define CAL_PADDING_H 20
+#define CAL_SHOW_H 335
+#define PICKER_SHOW_H 400
+#define CAL_BTN_BASE_H 66
+#define CAL_BTN_BASE_NBEAT_H 54
+
+ group {
+ name: "calendar_picker";
+ images {
+ image: "00_picker_arrow_left.png" COMP;
+ image: "00_picker_arrow_left_press.png" COMP;
+ image: "00_picker_arrow_right.png" COMP;
+ image: "00_picker_arrow_right_press.png" COMP;
+ image: "00_calend_picker_bar_button.png" COMP;
+ image: "00_calend_picker_bar_button_press.png" COMP;
+ image: "00_picker_btn_normal.png" COMP;
+ image: "00_picker_btn_press.png" COMP;
+ }
+ parts{
+ part { name: "base";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 { relative: 0 0; }
+ rel2 { relative: 1 1; }
+ color: 0 0 0 0;
+ }
+ }
+
+ part { name: "picker_base";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 0 PICKER_SHOW_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 1.1; to: "base"; }
+ rel2 { relative: 1.0 1.0; to: "base"; }
+ align: 0.0 0.0;
+ color: 255 0 0 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ rel1 { relative: 0.0 350/800; to: "base"; }
+ rel2 { relative: 1.0 1.0; to: "base"; }
+ visible: 1;
+ align: 0.0 1.0;
+ }
+ }
+ part { name: "swallow.calendar";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 0 CAL_SHOW_H;
+ fixed: 0 1;
+// rel1 { relative: 0.0 1.0; to: "button_base"; }
+ rel1 { relative: 0.0 1.0; to: "picker_base"; }
+ rel2 { relative: 1.0 1.0; to: "picker_base"; }
+ align: 0.0 1.0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "button_base";
+ type: RECT;
+ mouse_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 24 CAL_BTN_BASE_NBEAT_H;
+ max: 800 CAL_BTN_BASE_NBEAT_H;
+ fixed: 1 1;
+// rel2 { relative: 1.0 54/400; to: "picker_base"; }
+// rel2 { relative: 1.0 0.0; to: "picker_base"; }
+ rel1 { relative: 0.0 0.0; to: "swallow.calendar"; }
+ rel2 { relative: 1.0 0.0; to: "swallow.calendar"; }
+ color: 176 176 176 255;
+// align: 0.0 0.0;
+ align: 0.0 1.0;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "btn_prev";
+ mouse_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 46 42;
+ max: 46 42;
+ fixed: 1 1;
+ rel1.to: "button_base";
+ rel1.offset: 6 0;
+ rel2.to: "button_base";
+ image {
+ normal: "00_picker_btn_normal.png";
+ border: 4 4 4 4;
+ border_scale: 1;
+ }
+ align: 0.0 0.5;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_picker_btn_press.png";
+ border: 4 4 4 4;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "btn_prev_icon";
+ repeat_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 20 20;
+ max: 20 20;
+ fixed: 1 1;
+ rel1.to: "btn_prev";
+ rel2.to: "btn_prev";
+ align: 0.5 0.5;
+ image {
+ normal: "00_picker_arrow_left.png";
+ border: 4 4 4 4;
+ border_scale: 1;
+ }
+ fill.smooth : 0;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "show" 0.0;
+ image.normal: "00_picker_arrow_left_press.png";
+ }
+ }
+ part { name: "btn_next";
+ mouse_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 46 42;
+ max: 46 42;
+ fixed: 1 1;
+ rel1.to: "btn_prev";
+ rel1.relative: 1 0;
+ rel1.offset: 6 0;
+ rel2.to: "btn_prev";
+ rel2.relative: 1 1;
+ image {
+ normal: "00_picker_btn_normal.png";
+ border: 4 4 4 4;
+ border_scale: 1;
+ }
+ align: 0.0 0.5;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_picker_btn_press.png";
+ border: 4 4 4 4;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "btn_next_icon";
+ repeat_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 20 20;
+ max: 20 20;
+ fixed: 1 1;
+ rel1.to: "btn_next";
+ rel2.to: "btn_next";
+ align: 0.5 0.5;
+ image {
+ normal: "00_picker_arrow_right.png";
+ border: 4 4 4 4;
+ border_scale: 1;
+ }
+ fill.smooth : 0;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "show" 0.0;
+ image.normal: "00_picker_arrow_right_press.png";
+ }
+ }
+ part { name: "btn_done";
+ mouse_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 90 42;
+ max: 90 42;
+ fixed: 1 1;
+ rel1.to: "button_base";
+ rel2.to: "button_base";
+ rel2.offset: -6 0;
+ align: 1.0 0.5;
+ image {
+ normal: "00_picker_btn_normal.png";
+ border: 4 4 4 4;
+ border_scale: 1;
+ }
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "00_picker_btn_press.png";
+ border: 4 4 4 4;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "btn_done_text";
+ type: TEXT;
+ repeat_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ fixed: 1 1;
+ rel1.to: "btn_done";
+ rel2.to: "btn_done";
+ color: 0 0 0 255;
+ text {
+ font: "SLP:style=Medium";
+ size: 22;
+ min: 1 1;
+ align: 0.5 0.5;
+ }
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "calendar.show.effect";
+ signal: "calendar.show";
+ source: "show";
+ action: STATE_SET "show" 0.0;
+ target: "button_base";
+ target: "btn_prev";
+ target: "btn_prev_icon";
+ target: "btn_next";
+ target: "btn_next_icon";
+ target: "btn_done";
+ target: "btn_done_text";
+ target: "swallow.calendar";
+ after : "calendar.show.transition";
+ }
+ program {
+ name: "calendar.hide.effect";
+ action: STATE_SET "default" 0.0;
+ target: "swallow.calendar";
+ target: "button_base";
+ target: "btn_prev";
+ target: "btn_prev_icon";
+ target: "btn_next";
+ target: "btn_next_icon";
+ target: "btn_done";
+ target: "btn_done_text";
+ }
+ program {
+ name: "calendar.show.transition";
+ action: STATE_SET "show" 0.0;
+ target: "picker_base";
+// transition: SINUSOIDAL 0.5;
+ transition: DECELERATE 0.5;
+ }
+ program {
+ name: "calendar.hide.transition";
+ signal: "calendar.hide";
+ source: "hide";
+ action: STATE_SET "default" 0.0;
+ target: "picker_base";
+ transition: SINUSOIDAL 0.6;
+ after : "calendar.hide.effect";
+ }
+ program {
+ name: "prev_bt_click";
+ signal: "mouse,down,1";
+ source: "btn_prev";
+ action: STATE_SET "clicked" 0.0;
+ target: "btn_prev";
+ }
+ program {
+ name: "prev_bt_unclick";
+ signal: "mouse,up,1";
+ source: "btn_prev";
+ action: STATE_SET "show" 0.0;
+ target: "btn_prev";
+ }
+ program {
+ name: "next_bt_click";
+ signal: "mouse,down,1";
+ source: "btn_next";
+ action: STATE_SET "clicked" 0.0;
+ target: "btn_next";
+ }
+ program {
+ name: "next_bt_unclick";
+ signal: "mouse,up,1";
+ source: "btn_next";
+ action: STATE_SET "show" 0.0;
+ target: "btn_next";
+ }
+ program {
+ name: "done_bt_click";
+ signal: "mouse,down,1";
+ source: "btn_done";
+ action: STATE_SET "clicked" 0.0;
+ target: "btn_done";
+ }
+ program {
+ name: "done_bt_unclick";
+ signal: "mouse,up,1";
+ source: "btn_done";
+ action: STATE_SET "show" 0.0;
+ target: "btn_done";
+ }
+ }
+ }
+}
--- /dev/null
+#define PADDING(title, w, h, fixed_w, fixed_h, align_w, align_h, l, t, r, b, rel1_to, rel2_to) \
+ part { name: title; \
+ type: RECT; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ visible: 1; \
+ min: w h; \
+ max: w h; \
+ fixed: fixed_w fixed_h; \
+ align: align_w align_h; \
+ rel1 { relative: l t; to: rel1_to; } \
+ rel2 { relative: r b; to: rel2_to; } \
+ color: 255 5 5 255; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_BASE( param_item_height ) \
+ part { name: "base"; \
+ type: RECT; \
+ repeat_events: 1; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: 0 param_item_height; \
+ color: 0 0 0 0; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_BG_IMAGE \
+ part { name: "bg_image"; \
+ clip_to: "disclip"; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ visible: 0; \
+ image.normal: "images/00_list_bar_press_1x80.png"; \
+ } \
+ description { state: "selected" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_BOTTOM_LINE \
+ part { name: "bottom_line"; \
+ type: RECT; \
+ clip_to: "disclip"; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ min: 0 1; \
+ fixed: 0 1; \
+ visible: 1; \
+ color: 104 97 92 255; \
+ rel1 { \
+ relative: 0.0 1.0; \
+ offset: 0 -1; \
+ } \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \
+ part { name: "elm.padding.left"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: param_padding_size 0; \
+ fixed: 1 0; \
+ visible: 0; \
+ rel2.relative: 0.0 1.0; \
+ align: 0.0 0.0; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
+ part { name: "elm.padding.right"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: param_padding_size 0; \
+ fixed: 1 0; \
+ visible: 0; \
+ rel1.relative: 1.0 0.0; \
+ align: 1.0 0.0; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_DISCLIP \
+ part { name: "disclip"; \
+ type: RECT; \
+ description { state: "default" 0.0; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 64; \
+ } \
+ }
--- /dev/null
+#include "ug-calendar-picker-efl_macro.edc"
+
+collections {
+
+ group { name: "elm/genlist/item/ug-calendar-picker-efl/1line_textonly/default";
+ alias: "elm/genlist/item_odd/ug-calendar-picker-efl/1line_textonly/default";
+
+ data.item: "stacking" "above";
+ data.item: "selectraise" "on";
+ data.item: "texts" "elm.text";
+ images {
+ image: "images/00_list_bar_press_1x80.png" COMP;
+ }
+ parts {
+ BEAT_GENLIST_PART_BASE( 80 )
+ BEAT_GENLIST_PART_BG_IMAGE
+ BEAT_GENLIST_PART_BOTTOM_LINE
+ BEAT_GENLIST_PART_PADDING_LEFT( 15 )
+ BEAT_GENLIST_PART_PADDING_RIGHT( 15 )
+
+ part { name: "elm.text";
+ clip_to: "disclip";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: 0 0;
+ to_x: "elm.padding.left";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ offset: 0 0;
+ to_x: "elm.padding.right";
+ }
+ color: 255 255 255 255;
+ text {
+ font: FONT_ROM;
+ size: 32;
+ min: 0 1;
+ align: 0.0 0.5;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color: 225 225 225 255;
+ }
+ }
+ BEAT_GENLIST_PART_DISCLIP
+ }
+ programs {
+ // signal: elm,state,%s,active
+ // a "check" item named %s went active
+ // signal: elm,state,%s,passive
+ // a "check" item named %s went passive
+ // default is passive
+ program { name: "go_active";
+ signal: "elm,state,selected";
+ source: "elm";
+ action: STATE_SET "selected" 0.0;
+ target: "bg_image";
+ target: "elm.text";
+ }
+ program { name: "go_passive";
+ signal: "elm,state,unselected";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg_image";
+ target: "elm.text";
+ transition: LINEAR 0.1;
+ }
+ program { name: "go_disabled";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disclip";
+ }
+ program { name: "go_enabled";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disclip";
+ }
+ }
+ }
+
+}
+