diff options
author | jinwoo.shin <jw0227.shin@samsung.com> | 2015-06-08 16:29:34 +0900 |
---|---|---|
committer | jinwoo.shin <jw0227.shin@samsung.com> | 2015-06-10 21:05:56 +0900 |
commit | 687df308620e80b81d80649dce08ae3306945b26 (patch) | |
tree | 640a6152002be4c606fa5f5a9b52098c87f32a58 | |
parent | 9505c0c9a45e71eca21e0ae891b3d68f13105621 (diff) | |
download | air_infosquare-687df308620e80b81d80649dce08ae3306945b26.tar.gz air_infosquare-687df308620e80b81d80649dce08ae3306945b26.tar.bz2 air_infosquare-687df308620e80b81d80649dce08ae3306945b26.zip |
Add initial project
Change-Id: I8dab736c023718558036bc2b9b78ef81cd64ffa7
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
-rw-r--r-- | CMakeLists.txt | 77 | ||||
-rw-r--r-- | data/CMakeLists.txt | 32 | ||||
-rw-r--r-- | data/infosquare-theme.edc | 20 | ||||
-rw-r--r-- | data/infosquare.edc | 161 | ||||
-rw-r--r-- | images/btn_clearall_dis.png | bin | 0 -> 3429 bytes | |||
-rw-r--r-- | images/btn_clearall_foc.png | bin | 0 -> 3423 bytes | |||
-rw-r--r-- | images/btn_clearall_nor.png | bin | 0 -> 3450 bytes | |||
-rw-r--r-- | images/ic_thumb_connection.png | bin | 0 -> 1970 bytes | |||
-rw-r--r-- | images/ic_thumb_memo.png | bin | 0 -> 1288 bytes | |||
-rw-r--r-- | images/ic_thumb_shedule.png | bin | 0 -> 1612 bytes | |||
-rw-r--r-- | images/ic_thumb_things.png | bin | 0 -> 2026 bytes | |||
-rw-r--r-- | images/ic_thumbnail_favorite.png | bin | 0 -> 3198 bytes | |||
-rw-r--r-- | include/define.h | 24 | ||||
-rw-r--r-- | include/main_view.h | 22 | ||||
-rw-r--r-- | org.tizen.infosquare.png | bin | 0 -> 38658 bytes | |||
-rw-r--r-- | org.tizen.infosquare.xml.in | 10 | ||||
-rw-r--r-- | packaging/org.tizen.infosquare.spec | 56 | ||||
-rw-r--r-- | src/main.c | 143 | ||||
-rw-r--r-- | src/main_view.c | 118 |
19 files changed, 663 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a8a4694 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,77 @@ +# Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# + +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT("infosquare" C) + +IF(NOT DEFINED PACKAGE_NAME) + SET(PACKAGE_NAME "org.tizen.${PROJECT_NAME}") +ENDIF(NOT DEFINED PACKAGE_NAME) + +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +IF(NOT DEFINED BINDIR) + SET(BINDIR "${PREFIX}/bin") +ENDIF(NOT DEFINED BINDIR) +IF(NOT DEFINED RESDIR) + SET(RESDIR "${PREFIX}/res") +ENDIF(NOT DEFINED RESDIR) +IF(NOT DEFINED IMAGEDIR) + SET(IMAGEDIR "${PREFIX}/res/images") +ENDIF(NOT DEFINED IMAGEDIR) +IF(NOT DEFINED EDJEDIR) + SET(EDJEDIR "${PREFIX}/res/edje") +ENDIF(NOT DEFINED EDJEDIR) +IF(NOT DEFINED MANIFESTDIR) + SET(MANIFESTDIR "/usr/share/packages") +ENDIF(NOT DEFINED MANIFESTDIR) + +SET(SRCS src/main.c + src/main_view.c + src/square_view.c) + +SET(TARGET_EDJ "${PROJECT_NAME}.edj") +SET(THEME_EDJ "${PROJECT_NAME}-theme.edj") + +ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"") +ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"") +ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"") +ADD_DEFINITIONS("-DEDJEFILE=\"${EDJEDIR}/${TARGET_EDJ}\"") +ADD_DEFINITIONS("-DTHEMEFILE=\"${EDJEDIR}/${THEME_EDJ}\"") + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(PKGS REQUIRED + elementary + ecore + edje + capi-appfw-application + app-utils + notification + notification-service) + +FOREACH(flag ${PKGS_CFLAGS}) + SET(EXTRA_CFLGAS "${EXTRA_CFLGAS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLGAS}") +ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKGS_LDFLAGS}) +CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${PACKAGE_NAME}.xml) + +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) +INSTALL(FILES ${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR}) + +ADD_SUBDIRECTORY(data) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt new file mode 100644 index 0000000..1252c32 --- /dev/null +++ b/data/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# + +ADD_CUSTOM_TARGET(${TARGET_EDJ} + COMMAND edje_cc -id images + ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.edc + ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_EDJ} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} ${TARGET_EDJ}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_EDJ} DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(${THEME_EDJ} + COMMAND edje_cc -id images -sd sounds + ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}-theme.edc + ${CMAKE_CURRENT_BINARY_DIR}/${THEME_EDJ} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}-theme.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} ${THEME_EDJ}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${THEME_EDJ} DESTINATION ${EDJEDIR}) diff --git a/data/infosquare-theme.edc b/data/infosquare-theme.edc new file mode 100644 index 0000000..0c35184 --- /dev/null +++ b/data/infosquare-theme.edc @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 "../include/define.h" + +collections { +} diff --git a/data/infosquare.edc b/data/infosquare.edc new file mode 100644 index 0000000..deff29e --- /dev/null +++ b/data/infosquare.edc @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 "../include/define.h" + +collections { + group { + name: GRP_MAIN_VIEW; + parts { + part { + name, PART_NOTIFICATION_TITLE; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + rel1.relative, 0.0 0.0; + rel2.relative, 1.0 0.0; + text { + text, STR_NOTIFICATION_TITLE; + size, 40; + align, 0.5 0.5; + } + min, 0 200; + align, 0.0 0.0; + fixed, 0 1; + visible, 1; + } + } + part { + name, PART_NOTIFICATION_CLEAR; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, PART_NOTIFICATION_TITLE; + relative, 1.0 0.5; + } + rel2 { + to, PART_NOTIFICATION_TITLE; + relative, 1.0 0.5; + } + align, 1.0 0.5; + min, 400 150; + fixed, 1 1; + visible, 1; + } + } + part { + name, PART_NOTIFICATION_TITLE_BORDER; + type, RECT; + scale, 1; + description { + rel1 { + to, PART_NOTIFICATION_TITLE; + relative, 0.0 1.0; + } + rel2 { + to, PART_NOTIFICATION_TITLE; + relative, 1.0 1.0; + } + min, 0 2; + color, 255 255 255 255; + fixed, 1 1; + visible, 1; + } + } + part { + name, PART_NOTIFICATION_CONTENT; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, PART_NOTIFICATION_TITLE_BORDER; + relative, 0.0 1.0; + } + align, 0.0 0.0; + fixed, 0 0; + visible, 1; + } + description { + state, "nonotification" 0.0; + inherit, "default" 0.0; + visible, 0; + } + } + part { + name, PART_NOTIFICATION_NONOTIFICATION; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, PART_NOTIFICATION_TITLE_BORDER; + relative, 0.0 1.0; + } + text { + text, STR_NONOTIFICATION; + size, 40; + align, 0.5 0.5; + } + align, 0.0 0.0; + fixed, 0 0; + visible, 0; + } + description { + state, "nonotification" 0.0; + inherit, "default" 0.0; + visible, 1; + } + } + + } + programs { + program { + name, "nonotification"; + signal, SIGNAL_NONOTIFICATION; + source, SOURCE_PROGRAM; + action, STATE_SET "nonotification" 0.0; + target, PART_NOTIFICATION_CONTENT; + target, PART_NOTIFICATION_NONOTIFICATION; + } + program { + name, "notification"; + signal, SIGNAL_NOTIFICATION; + action, STATE_SET "default" 0.0; + source, SOURCE_PROGRAM; + target, PART_NOTIFICATION_CONTENT; + target, PART_NOTIFICATION_NONOTIFICATION; + } + } + } + group { + name: GRP_SQUARE_VIEW; + parts { + part { + name, PART_CONTENT; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + } + } + } + } + +} diff --git a/images/btn_clearall_dis.png b/images/btn_clearall_dis.png Binary files differnew file mode 100644 index 0000000..fb138ea --- /dev/null +++ b/images/btn_clearall_dis.png diff --git a/images/btn_clearall_foc.png b/images/btn_clearall_foc.png Binary files differnew file mode 100644 index 0000000..950c901 --- /dev/null +++ b/images/btn_clearall_foc.png diff --git a/images/btn_clearall_nor.png b/images/btn_clearall_nor.png Binary files differnew file mode 100644 index 0000000..8b63be7 --- /dev/null +++ b/images/btn_clearall_nor.png diff --git a/images/ic_thumb_connection.png b/images/ic_thumb_connection.png Binary files differnew file mode 100644 index 0000000..2943334 --- /dev/null +++ b/images/ic_thumb_connection.png diff --git a/images/ic_thumb_memo.png b/images/ic_thumb_memo.png Binary files differnew file mode 100644 index 0000000..2739d65 --- /dev/null +++ b/images/ic_thumb_memo.png diff --git a/images/ic_thumb_shedule.png b/images/ic_thumb_shedule.png Binary files differnew file mode 100644 index 0000000..72a9b74 --- /dev/null +++ b/images/ic_thumb_shedule.png diff --git a/images/ic_thumb_things.png b/images/ic_thumb_things.png Binary files differnew file mode 100644 index 0000000..dc00313 --- /dev/null +++ b/images/ic_thumb_things.png diff --git a/images/ic_thumbnail_favorite.png b/images/ic_thumbnail_favorite.png Binary files differnew file mode 100644 index 0000000..ca55b22 --- /dev/null +++ b/images/ic_thumbnail_favorite.png diff --git a/include/define.h b/include/define.h new file mode 100644 index 0000000..3b15a3f --- /dev/null +++ b/include/define.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 __AIR_INFOSQUARE_DEFINE_H__ +#define __AIR_INFOSQUARE_DEFINE_H__ + +#define VIEW_MAIN "VIEW_MAIN" +#define GRP_MAIN_VIEW "grp.main.view" +#define PART_CONTENT "part.content" + +#endif /* __AIR_INFOSQUARE_DEFINE_H__*/ diff --git a/include/main_view.h b/include/main_view.h new file mode 100644 index 0000000..a963e60 --- /dev/null +++ b/include/main_view.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 __AIR_INFOSQUARE_MAIN_VIEW_H__ +#define __AIR_INFOSQUARE_MAIN_VIEW_H__ + +view_class *view_main_get_vclass(void); + +#endif /* __AIR_INFOSQUARE_MAIN_VIEW_H__*/ diff --git a/org.tizen.infosquare.png b/org.tizen.infosquare.png Binary files differnew file mode 100644 index 0000000..affa436 --- /dev/null +++ b/org.tizen.infosquare.png diff --git a/org.tizen.infosquare.xml.in b/org.tizen.infosquare.xml.in new file mode 100644 index 0000000..6c3f516 --- /dev/null +++ b/org.tizen.infosquare.xml.in @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns="http://tizen.org/ns/packages" package="@PACKAGE_NAME@" version="@VERSION@" install-location="internal-only"> + <label>Info. Square</label> + <author email="jw0227.shin@samsung.com" href="www.samsung.com">Jinwoo Shin</author> + <description>Info. Square application for Tizen TV</description> + <ui-application appid="@PACKAGE_NAME@" exec="@BINDIR@/@PROJECT_NAME@" nodisplay="true" multiple="false" type="capp" taskmanage="true"> + <label>Info. Square</label> + <icon>@DESKTOP_ICON@</icon> + </ui-application> +</manifest> diff --git a/packaging/org.tizen.infosquare.spec b/packaging/org.tizen.infosquare.spec new file mode 100644 index 0000000..7bb4143 --- /dev/null +++ b/packaging/org.tizen.infosquare.spec @@ -0,0 +1,56 @@ +Name: org.tizen.infosquare +Summary: Info. Square application for Tizen TV +Version: 0.1 +Release: 1 +Group: Applications +License: Apache-2.0 +Source0: %{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(ecore) +BuildRequires: pkgconfig(edje) +BuildRequires: pkgconfig(app-utils) +BuildRequires: pkgconfig(notification) +BuildRequires: pkgconfig(notification-service) +BuildRequires: gettext-devel +BuildRequires: edje-bin + +%define _pkgdir %{_prefix}/apps/%{name} +%define _bindir %{_pkgdir}/bin +%define _resdir %{_pkgdir}/res +%define _datadir %{_pkgdir}/data +%define _edjedir %{_resdir}/edje +%define _manifestdir %{_datarootdir}/packages + +%description +Info. Square application for Tizen TV. + +%prep +%setup -q + +%build +cmake \ + -DCMAKE_INSTALL_PREFIX=%{_pkgdir} \ + -DPACKAGE_NAME=%{name} \ + -DBINDIR=%{_bindir} \ + -DEDJEDIR=%{_edjedir} \ + -DMANIFESTDIR=%{_manifestdir} \ + -DVERSION=%{version} + +make %{?jobs:-j%jobs} + +%install +%make_install +install --directory %{buildroot}/%{_datadir} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_bindir}/* +%{_resdir}/* +%{_datadir} +%{_manifestdir}/%{name}.xml diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..294988a --- /dev/null +++ b/src/main.c @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 <app.h> +#include <Elementary.h> +#include <viewmgr.h> +#include <app_debug.h> + +#include "define.h" +#include "main_view.h" + +SET_TAG(PACKAGE) + +struct _appdata { + const char *name; + Evas_Object *win; +}; + +static Evas_Object *_add_win(const char *name) +{ + Evas_Object *win; + + win = elm_win_add(NULL, name, ELM_WIN_BASIC); + if (!win) { + _ERR("failed to create win"); + return NULL; + } + elm_win_alpha_set(win, EINA_FALSE); + elm_win_focus_highlight_enabled_set(win, EINA_TRUE); + elm_win_focus_highlight_style_set(win, "invisible"); + + evas_object_show(win); + + return win; +} + +static void _pause(void *data) +{ +} + +static void _resume(void *data) +{ +} + +static bool _create(void *data) +{ + struct _appdata *ad; + Evas_Object *win; + + if (!data) { + _ERR("failed to get data"); + return false; + } + + ad = data; + + elm_theme_overlay_add(NULL, THEMEFILE); + + win = _add_win(ad->name); + if (!win) { + _ERR("failed to create win object"); + return false; + } + + if (!viewmgr_create(win)) { + _ERR("failed to initialize viewmgr"); + evas_object_del(win); + return false; + } + + viewmgr_add_view(view_main_get_vclass(), NULL); + + ad->win = win; + + return true; +} + +static void _terminate(void *data) +{ + struct _appdata *ad; + + if (!data) { + _ERR("failed to get data"); + return; + } + + ad = data; + + viewmgr_remove_view(VIEW_MAIN); + viewmgr_destroy(); + + if (ad->win) { + evas_object_del(ad->win); + ad->win = NULL; + } +} + +static void _control(app_control_h control, void *data) +{ + struct _appdata *ad; + + if (!data) { + _ERR("failed to get data"); + return; + } + + ad = data; + + if (ad->win) + elm_win_activate(ad->win); + + viewmgr_push_view(VIEW_MAIN); +} + +int main(int argc, char *argv[]) +{ + struct _appdata ad; + ui_app_lifecycle_callback_s cbs = { + .create = _create, + .terminate = _terminate, + .pause = _pause, + .resume = _resume, + .app_control = _control, + }; + + memset(&ad, 0x00, sizeof(ad)); + ad.name = PACKAGE; + + return ui_app_main(argc, argv, &cbs, &ad); +} diff --git a/src/main_view.c b/src/main_view.c new file mode 100644 index 0000000..dc0fb77 --- /dev/null +++ b/src/main_view.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 <Elementary.h> +#include <viewmgr.h> +#include <inputmgr.h> +#include <app_debug.h> + +#include "define.h" +#include "main_view.h" + +struct _priv { + Evas_Object *base; +}; + +static Evas_Object *_create(Evas_Object *win, void *data) +{ + struct _priv *priv; + Evas_Object *base; + + if (!win) { + _ERR("failed to get win object"); + return NULL; + } + + priv = calloc(1, sizeof(*priv)); + if (!priv) { + _ERR("failed to allocate priv"); + return NULL; + } + + base = elm_layout_add(win); + if (!base) { + _ERR("failed to create base object"); + free(priv); + return NULL; + } + elm_layout_file_set(base, EDJEFILE, GRP_MAIN_VIEW); + + evas_object_size_hint_weight_set(base, + EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, base); + + priv->base = base; + viewmgr_set_view_data(VIEW_MAIN, priv); + + return base; +} + +static void _show(void *view_data) +{ + struct _priv *priv; + + if (!view_data) { + _ERR("failed to get view data"); + return; + } + + priv = (struct _priv *) view_data; + + evas_object_show(priv->base); +} + +static void _hide(void *view_data) +{ + struct _priv *priv; + + if (!view_data) { + _ERR("failed to get view data"); + return; + } + + priv = (struct _priv *) view_data; + + evas_object_hide(priv->base); +} + +static void _destroy(void *view_data) +{ + struct _priv *priv; + + if (!view_data) { + _ERR("failed to get view data"); + return; + } + + priv = (struct _priv *) view_data; + + evas_object_del(priv->base); + + free(priv); +} + +static view_class vclass = { + .view_id = VIEW_MAIN, + .create = _create, + .show = _show, + .hide = _hide, + .destroy = _destroy, +}; + +view_class *view_main_get_vclass(void) +{ + return &vclass; +} |