src/data/datamgr.c
src/data/data_home.c
src/data/data_recent.c
+ src/view/view_user.c
src/view/view_recent.c
src/view/view_home.c)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
collections {
#include "view/home.edc"
#include "view/recent.edc"
+ #include "view/user.edc"
}
--- /dev/null
+/*
+ * Copyright (c) 2015 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 "../../include/defs.h"
+group {
+ name, GRP_USER;
+ parts {
+ }
+}
#define GRP_HOME_DOWN_ARROW "group.home.down.arrow"
#define GRP_HOME_ITEM "group.home.item"
#define GRP_RECENT "group.recent"
-#define GRP_RECENT_DELETE "grp.recent.delete"
-#define GRP_RECENT_ICON "grp.recent.icon"
-#define GRP_RECENT_PREVIEW "grp.recent.preview"
+#define GRP_RECENT_DELETE "group.recent.delete"
+#define GRP_RECENT_ICON "group.recent.icon"
+#define GRP_RECENT_PREVIEW "group.recent.preview"
+#define GRP_USER "group.user"
#define PART_HOME_MENU_BAR "part.home.menu.bar"
#define PART_HOME_UP_ARROW "part.home.up.arrow"
--- /dev/null
+/*
+ * Copyright (c) 2015 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_HOME_VIEW_USER_H__
+#define __AIR_HOME_VIEW_USER_H__
+
+view_class *view_user_get_vclass(void);
+
+#endif /* __AIR_HOME_VIEW_USER_H__ */
#include "defs.h"
#include "view_home.h"
#include "view_recent.h"
+#include "view_user.h"
SET_TAG(PACKAGE);
viewmgr_add_view(view_home_get_vclass(), NULL);
viewmgr_add_view(view_recent_get_vclass(), NULL);
+ viewmgr_add_view(view_user_get_vclass(), NULL);
ad->win = win;
--- /dev/null
+/*
+
+ * Copyright (c) 2015 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 <app_debug.h>
+#include <viewmgr.h>
+#include <inputmgr.h>
+
+#include "defs.h"
+#include "view_user.h"
+#include "datamgr.h"
+#include "utils.h"
+
+struct _priv {
+ Evas_Object *win;
+ Evas_Object *base;
+};
+
+static Evas_Object *_create(Evas_Object *win, void *data)
+{
+ struct _priv *priv;
+ Evas_Object *base;
+
+ if (!win) {
+ _ERR("Invalid argument");
+ return NULL;
+ }
+
+ priv = calloc(1, sizeof(*priv));
+ if (!priv) {
+ _ERR("failed to calloc priv");
+ return NULL;
+ }
+
+ base = utils_add_layout(win, GRP_USER, false, NULL);
+ if (!base) {
+ _ERR("failed to create base");
+ free(priv);
+ return NULL;
+ }
+ evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, base);
+
+ priv->win = win;
+ priv->base = base;
+
+ viewmgr_set_view_data(VIEW_USER, priv);
+
+ return base;
+}
+
+static void _show(void *data)
+{
+ struct _priv *priv;
+
+ if (!data) {
+ _ERR("Invalid argument");
+ return;
+ }
+
+ priv = data;
+
+ evas_object_show(priv->base);
+}
+
+static void _hide(void *data)
+{
+ struct _priv *priv;
+
+ if (!data) {
+ _ERR("Invalid argument");
+ return;
+ }
+
+ priv = data;
+
+ evas_object_hide(priv->base);
+}
+
+static void _destroy(void *data)
+{
+ struct _priv *priv;
+
+ if (!data) {
+ _ERR("Invalid argument");
+ return;
+ }
+
+ priv = data;
+ evas_object_del(priv->base);
+ free(priv);
+}
+
+static view_class vclass = {
+ .view_id = VIEW_USER,
+ .create = _create,
+ .show = _show,
+ .hide = _hide,
+ .destroy = _destroy
+};
+
+view_class *view_user_get_vclass(void)
+{
+ return &vclass;
+}
+