src/data/data_home.c
src/data/data_recent.c
src/data/data_user.c
+ src/view/view_photo.c
src/view/view_user_edit.c
src/view/view_user.c
src/view/view_recent.c
#include "view/recent.edc"
#include "view/user.edc"
#include "view/useredit.edc"
+ #include "view/photo.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_PHOTO;
+ parts {
+ }
+}
#define VIEW_RECENT "VIEW_RECENT"
#define VIEW_USER "VIEW_USER"
#define VIEW_USER_EDIT "VIEW_USER_EDIT"
+#define VIEW_PHOTO "VIEW_PHOTO"
#define SRC_PROG "prog"
#define SRC_EDJE "edje"
#define GRP_USER_EDIT_ICON_LIST "group.user.edit.icon.list"
#define GRP_USER_EDIT_ICON_LIST_ITEM "group.user.edit.icon.list.item"
#define GRP_BAR_ITEM "group.bar.item"
+#define GRP_PHOTO "group.photo"
#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_PHOTO_H__
+#define __AIR_HOME_VIEW_PHOTO_H__
+
+view_class *view_photo_get_vclass(void);
+
+#endif /* __AIR_HOME_VIEW_PHOTO_H__ */
--- /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_photo.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_PHOTO, 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_PHOTO, 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_PHOTO,
+ .create = _create,
+ .show = _show,
+ .hide = _hide,
+ .destroy = _destroy
+};
+
+view_class *view_photo_get_vclass(void)
+{
+ return &vclass;
+}
+
#include "defs.h"
#include "view_user_edit.h"
+#include "view_photo.h"
#include "datamgr.h"
#include "utils.h"
!strcmp(ev->keyname, KEY_ENTER_REMOTE)) {
/* It should be implemented later */
evas_object_del(data);
+ viewmgr_push_view(VIEW_PHOTO);
}
}
}
viewmgr_set_view_data(VIEW_USER_EDIT, priv);
+ viewmgr_add_view(view_photo_get_vclass(), NULL);
return base;
}
inputmgr_remove_callback(priv->photo, &photo_handler);
inputmgr_remove_callback(priv->done, &done_handler);
inputmgr_remove_callback(priv->cancel, &cancel_handler);
+ viewmgr_remove_view(VIEW_PHOTO);
evas_object_del(priv->base);
free(priv);
}