add initial base view 04/41904/1
authorJehun Lim <jehun.lim@samsung.com>
Fri, 19 Jun 2015 05:35:10 +0000 (14:35 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Fri, 19 Jun 2015 05:35:10 +0000 (14:35 +0900)
: convert movie, gallery, music view to movie, gallery, music layout

Change-Id: Ie8a2034ec4d2e12eb5019a9a194d9876546d9e83
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
30 files changed:
CMakeLists.txt
include/define.h
include/layout.h
include/layout/gallery.h [new file with mode: 0644]
include/layout/menu.h [deleted file]
include/layout/movie.h [new file with mode: 0644]
include/layout/music.h [new file with mode: 0644]
include/view.h
include/view/base.h [new file with mode: 0644]
include/view/gallery.h [deleted file]
include/view/movie.h [deleted file]
include/view/music.h [deleted file]
res/edc/layout/gallery.edc [new file with mode: 0644]
res/edc/layout/menu_layout.edc [deleted file]
res/edc/layout/movie.edc [new file with mode: 0644]
res/edc/layout/music.edc [new file with mode: 0644]
res/edc/mediahub.edc
res/edc/view/base.edc [new file with mode: 0644]
res/edc/view/gallery.edc [deleted file]
res/edc/view/movie.edc [deleted file]
res/edc/view/music.edc [deleted file]
src/layout/gallery.c [new file with mode: 0644]
src/layout/menu_layout.c [deleted file]
src/layout/movie.c [new file with mode: 0644]
src/layout/music.c [new file with mode: 0644]
src/main.c
src/view/base.c [new file with mode: 0644]
src/view/gallery.c [deleted file]
src/view/movie.c [deleted file]
src/view/music.c [deleted file]

index 9aef68f0a242fe9b5215b65aa8a74f7f808990ab..d6ee7b06d31e58711511004d44edf494a7f747c7 100644 (file)
@@ -48,11 +48,11 @@ ENDIF(NOT DEFINED PACKAGEDIR)
 
 SET(SRCS
 src/main.c
-src/view/movie.c
-src/view/gallery.c
-src/view/music.c
+src/view/base.c
 src/view/viewer.c
-src/layout/menu_layout.c
+src/layout/movie.c
+src/layout/gallery.c
+src/layout/music.c
 )
 
 SET(TARGET_EDJ "${PROJECT_NAME}.edj")
index 82d89271fbcff7a2318a2ebf1fde07ab160f70b0..8fd4bf93e698cde1bbb1c503b089bb609852ca8f 100644 (file)
 #define __AIR_MEDIAHUB_DEFINE_H__
 
 /* views */
-#include "view/movie.h"
-#include "view/gallery.h"
-#include "view/music.h"
+#include "view/base.h"
 #include "view/viewer.h"
 
 /* layouts */
-#include "layout/menu.h"
+#include "layout/movie.h"
+#include "layout/gallery.h"
+#include "layout/music.h"
 
 /* defines */
 #define STYLE_INVISIBLE "invisible"
index 5b3f2b5abe328ad86dd99d7235382de38a37f46e..d20ddee77223488108e14663d3857acc7998b229 100644 (file)
 #ifndef __AIR_MEDIAHUB_LAYOUT_H__
 #define __AIR_MEDIAHUB_LAYOUT_H__
 
-/* menu */
-layout_class *layout_menu_get_lclass(void);
+/* movie */
+layout_class *layout_movie_get_lclass(void);
+
+/* gallery */
+layout_class *layout_gallery_get_lclass(void);
+
+/* music */
+layout_class *layout_music_get_lclass(void);
 
 #endif /* __AIR_MEDIAHUB_LAYOUT_H__ */
diff --git a/include/layout/gallery.h b/include/layout/gallery.h
new file mode 100644 (file)
index 0000000..aa7e914
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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_MEDIAHUB_LAYOUT_GALLERY_H__
+#define __AIR_MEDIAHUB_LAYOUT_GALLERY_H__
+
+#define LAYOUT_GALLERY "LAYOUT_GALLERY"
+
+#define GRP_GALLERY_LAYOUT "group.gallery_layout"
+
+#endif /* __AIR_MEDIAHUB_LAYOUT_GALLERY_H__ */
diff --git a/include/layout/menu.h b/include/layout/menu.h
deleted file mode 100644 (file)
index 2232c2e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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_MEDIAHUB_LAYOUT_MENU_H__
-#define __AIR_MEDIAHUB_LAYOUT_MENU_H__
-
-#define LAYOUT_MENU "LAYOUT_MENU"
-
-#define GRP_MENU_LAYOUT "group.menu_layout"
-
-#define PART_MENU_LAYOUT "part.menu_layout"
-
-#endif /* __AIR_MEDIAHUB_LAYOUT_MENU_H__ */
diff --git a/include/layout/movie.h b/include/layout/movie.h
new file mode 100644 (file)
index 0000000..a0aaa9f
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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_MEDIAHUB_LAYOUT_MOVIE_H__
+#define __AIR_MEDIAHUB_LAYOUT_MOVIE_H__
+
+#define LAYOUT_MOVIE "LAYOUT_MOVIE"
+
+#define GRP_MOVIE_LAYOUT "group.movie_layout"
+
+#endif /* __AIR_MEDIAHUB_LAYOUT_MOVIE_H__ */
diff --git a/include/layout/music.h b/include/layout/music.h
new file mode 100644 (file)
index 0000000..89ac040
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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_MEDIAHUB_LAYOUT_MUSIC_H__
+#define __AIR_MEDIAHUB_LAYOUT_MUSIC_H__
+
+#define LAYOUT_MUSIC "LAYOUT_MUSIC"
+
+#define GRP_MUSIC_LAYOUT "group.music_layout"
+
+#endif /* __AIR_MEDIAHUB_LAYOUT_MUSIC_H__ */
index c28e0d15a3756b3670ec2517ef49005960ad5789..aabb6ae2dd5c685b95c47530dd874d90390d9b49 100644 (file)
 #ifndef __AIR_MEDIAHUB_VIEW_H__
 #define __AIR_MEDIAHUB_VIEW_H__
 
-/* movie */
-view_class *view_movie_get_vclass(void);
-
-/* gallery */
-view_class *view_gallery_get_vclass(void);
-
-/* music */
-view_class *view_music_get_vclass(void);
+/* base */
+view_class *view_base_get_vclass(void);
 
 /* viewer */
 view_class *view_viewer_get_vclass(void);
diff --git a/include/view/base.h b/include/view/base.h
new file mode 100644 (file)
index 0000000..201d07f
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * 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_MEDIAHUB_VIEW_BASE_H__
+#define __AIR_MEDIAHUB_VIEW_BASE_H__
+
+#define VIEW_BASE "VIEW_BASE"
+
+#define GRP_BASE_VIEW "group.base_view"
+
+#define PART_MENU_AREA "part.menu_area"
+#define PART_THUMBNAIL_AREA "part.thumbnail_area"
+#define PART_BOTTOM_AREA "part.bottom_area"
+
+#endif /* __AIR_MEDIAHUB_VIEW_BASE_H__ */
diff --git a/include/view/gallery.h b/include/view/gallery.h
deleted file mode 100644 (file)
index 830899f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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_MEDIAHUB_VIEW_GALLERY_H__
-#define __AIR_MEDIAHUB_VIEW_GALLERY_H__
-
-#define VIEW_GALLERY "VIEW_GALLERY"
-
-#define GRP_GALLERY_VIEW "group.gallery_view"
-
-#endif /* __AIR_MEDIAHUB_VIEW_GALLERY_H__ */
diff --git a/include/view/movie.h b/include/view/movie.h
deleted file mode 100644 (file)
index 323843b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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_MEDIAHUB_VIEW_MOVIE_H__
-#define __AIR_MEDIAHUB_VIEW_MOVIE_H__
-
-#define VIEW_MOVIE "VIEW_MOVIE"
-
-#define GRP_MOVIE_VIEW "group.movie_view"
-
-#endif /* __AIR_MEDIAHUB_VIEW_MOVIE_H__ */
diff --git a/include/view/music.h b/include/view/music.h
deleted file mode 100644 (file)
index d727a59..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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_MEDIAHUB_VIEW_MUSIC_H__
-#define __AIR_MEDIAHUB_VIEW_MUSIC_H__
-
-#define VIEW_MUSIC "VIEW_MUSIC"
-
-#define GRP_MUSIC_VIEW "group.music_view"
-
-#endif /* __AIR_MEDIAHUB_VIEW_MUSIC_H__ */
diff --git a/res/edc/layout/gallery.edc b/res/edc/layout/gallery.edc
new file mode 100644 (file)
index 0000000..520e09a
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+group {
+       name: GRP_GALLERY_LAYOUT;
+}
diff --git a/res/edc/layout/menu_layout.edc b/res/edc/layout/menu_layout.edc
deleted file mode 100644 (file)
index ec1e28f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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.
- */
-
-group {
-       name: GRP_MENU_LAYOUT;
-}
diff --git a/res/edc/layout/movie.edc b/res/edc/layout/movie.edc
new file mode 100644 (file)
index 0000000..85385a5
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+group {
+       name: GRP_MOVIE_LAYOUT;
+}
diff --git a/res/edc/layout/music.edc b/res/edc/layout/music.edc
new file mode 100644 (file)
index 0000000..e2b0788
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+group {
+       name: GRP_MUSIC_LAYOUT;
+}
index bacbbec5a61ac4aaf86280ad43f3123dc17275c5..1366e00faef6ceb7aebfed5f972f10664989b1b3 100644 (file)
@@ -17,9 +17,9 @@
 #include "../../include/define.h"
 
 collections {
-       #include "view/movie.edc"
-       #include "view/gallery.edc"
-       #include "view/music.edc"
+       #include "view/base.edc"
        #include "view/viewer.edc"
-       #include "layout/menu_layout.edc"
+       #include "layout/movie.edc"
+       #include "layout/gallery.edc"
+       #include "layout/music.edc"
 }
diff --git a/res/edc/view/base.edc b/res/edc/view/base.edc
new file mode 100644 (file)
index 0000000..029bb9c
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+
+group {
+       name: GRP_BASE_VIEW;
+       parts {
+               part {
+                       name: "bg";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 255 255 255 255;
+                       }
+               }
+               part {
+                       name: PART_MENU_AREA;
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel2.relative: 1.0 0.0;
+                               align: 0.5 0.0;
+                       }
+               }
+               part {
+                       name: "padding_thumbnail_area";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: PART_MENU_AREA;
+                                       relative: 0.0 1.0;
+                               }
+                               rel2.to: PART_MENU_AREA;
+                               min: 0 71;
+                               align: 0.5 0.0;
+                               color: 223 223 223 255;
+                               fixed: 0 1;
+                       }
+               }
+               part {
+                       name: PART_THUMBNAIL_AREA;
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: "padding_thumbnail_area";
+                                       relative: 0.0 1.0;
+                               }
+                               rel2.to: "padding_thumbnail_area";
+                               align: 0.5 0.0;
+                       }
+               }
+               part {
+                       name: PART_BOTTOM_AREA;
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 {
+                                       to: PART_THUMBNAIL_AREA;
+                                       relative: 0.0 1.0;
+                               }
+                               rel2.to: PART_THUMBNAIL_AREA;
+                               align: 0.5 0.0;
+                       }
+               }
+       }
+}
diff --git a/res/edc/view/gallery.edc b/res/edc/view/gallery.edc
deleted file mode 100644 (file)
index cd292a7..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-
-group {
-       name: GRP_GALLERY_VIEW;
-       parts {
-               part {
-                       name: "bg";
-                       type: RECT;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               color: 255 255 255 255;
-                       }
-               }
-               part {
-                       name: PART_MENU_LAYOUT;
-                       type: SWALLOW;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               rel2.relative: 1.0 0.0;
-                               align: 0.5 0.0;
-                       }
-               }
-               part {
-                       name: "padding_content_layout";
-                       type: RECT;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               rel1 {
-                                       to: PART_MENU_LAYOUT;
-                                       relative: 0.0 1.0;
-                               }
-                               rel2.to: PART_MENU_LAYOUT;
-                               min: 0 71;
-                               align: 0.5 0.0;
-                               color: 223 223 223 255;
-                               fixed: 0 1;
-                       }
-               }
-               part {
-                       name: PART_CONTENT_LAYOUT;
-                       type: SWALLOW;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               rel1 {
-                                       to: "padding_content_layout";
-                                       relative: 0.0 1.0;
-                               }
-                               rel2.to: "padding_content_layout";
-                               min: 0 678;
-                               align: 0.5 0.0;
-                               fixed: 0 1;
-                       }
-               }
-       }
-}
diff --git a/res/edc/view/movie.edc b/res/edc/view/movie.edc
deleted file mode 100644 (file)
index f0de4bf..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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.
- */
-
-group {
-       name: GRP_MOVIE_VIEW;
-}
diff --git a/res/edc/view/music.edc b/res/edc/view/music.edc
deleted file mode 100644 (file)
index 946f756..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-
-group {
-       name: GRP_MUSIC_VIEW;
-       parts {
-               part {
-                       name: "bg";
-                       type: RECT;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               color: 255 255 255 255;
-                       }
-               }
-               part {
-                       name: PART_MENU_LAYOUT;
-                       type: SWALLOW;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               rel2.relative: 1.0 0.0;
-                               align: 0.5 0.0;
-                       }
-               }
-               part {
-                       name: "padding_content_layout";
-                       type: RECT;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               rel1 {
-                                       to: PART_MENU_LAYOUT;
-                                       relative: 0.0 1.0;
-                               }
-                               rel2.to: PART_MENU_LAYOUT;
-                               min: 0 71;
-                               align: 0.5 0.0;
-                               color: 223 223 223 255;
-                               fixed: 0 1;
-                       }
-               }
-               part {
-                       name: PART_CONTENT_LAYOUT;
-                       type: SWALLOW;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               rel1 {
-                                       to: "padding_content_layout";
-                                       relative: 0.0 1.0;
-                               }
-                               rel2.to: "padding_content_layout";
-                               min: 0 678;
-                               align: 0.5 0.0;
-                               fixed: 0 1;
-                       }
-               }
-       }
-}
diff --git a/src/layout/gallery.c b/src/layout/gallery.c
new file mode 100644 (file)
index 0000000..85df1b1
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * 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 <layoutmgr.h>
+
+#include "define.h"
+
+struct _priv {
+       Evas_Object *base;
+       Evas_Object *layout;
+
+       layoutmgr *lmgr;
+};
+
+static bool _create(layoutmgr *lmgr, void *data)
+{
+       struct _priv *priv;
+       Evas_Object *base, *layout;
+
+       if (!lmgr) {
+               _ERR("failed to get layoutmgr");
+               return false;
+       }
+
+       priv = calloc(1, sizeof(*priv));
+       if (!priv) {
+               _ERR("failed to allocate priv");
+               return false;
+       }
+
+       base = layoutmgr_get_base(lmgr);
+       if (!base) {
+               _ERR("failed to get base object");
+               free(priv);
+               return false;
+       }
+
+       layout = elm_layout_add(base);
+       if (!layout) {
+               _ERR("failed to create layout");
+               free(priv);
+               return false;
+       }
+
+       if (!elm_layout_file_set(layout, EDJEFILE, GRP_GALLERY_LAYOUT)) {
+               _ERR("failed to set layout file");
+               evas_object_del(layout);
+               free(priv);
+       }
+
+       priv->base = base;
+       priv->layout = layout;
+       priv->lmgr = lmgr;
+
+       layoutmgr_set_layout_data(lmgr, LAYOUT_GALLERY, priv);
+
+       return true;
+}
+
+static void _destroy(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to get layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_del(priv->layout);
+       free(priv);
+}
+
+static void _show(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_show(priv->layout);
+       elm_object_part_content_set(priv->base,
+                       PART_THUMBNAIL_AREA, priv->layout);
+}
+
+static void _hide(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to get layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_hide(priv->layout);
+       elm_object_part_content_unset(priv->base, PART_THUMBNAIL_AREA);
+}
+
+static void _update(void *layout_data, int update_type, void *data)
+{
+}
+
+static layout_class _lclass = {
+       .layout_id = LAYOUT_GALLERY,
+       .create = _create,
+       .show = _show,
+       .hide = _hide,
+       .destroy = _destroy,
+       .update = _update,
+};
+
+layout_class *layout_gallery_get_lclass(void)
+{
+       return &_lclass;
+}
diff --git a/src/layout/menu_layout.c b/src/layout/menu_layout.c
deleted file mode 100644 (file)
index a5c2cb1..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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 <layoutmgr.h>
-
-#include "define.h"
-
-struct _priv {
-       Evas_Object *base;
-       Evas_Object *layout;
-
-       layoutmgr *lmgr;
-};
-
-static bool _create(layoutmgr *lmgr, void *data)
-{
-       struct _priv *priv;
-       Evas_Object *base, *layout;
-
-       priv = calloc(1, sizeof(*priv));
-       if (!priv) {
-               _ERR("failed to allocate priv");
-               return false;
-       }
-
-       base = layoutmgr_get_base(lmgr);
-       if (!base) {
-               _ERR("failed to get base object");
-               free(priv);
-               return false;
-       }
-
-       layout = elm_layout_add(base);
-       if (!layout) {
-               _ERR("failed to create layout");
-               free(priv);
-               return false;
-       }
-
-       if (!elm_layout_file_set(layout, EDJEFILE, GRP_MENU_LAYOUT)) {
-               _ERR("failed to set layout file");
-               evas_object_del(layout);
-               free(priv);
-       }
-
-       layoutmgr_set_layout_data(lmgr, LAYOUT_MENU, priv);
-
-       priv->base = base;
-       priv->layout = layout;
-       priv->lmgr = lmgr;
-
-       return true;
-}
-
-static void _destroy(void *layout_data)
-{
-       struct _priv *priv;
-
-       if (!layout_data)
-               return;
-
-       priv = layout_data;
-
-       evas_object_del(priv->layout);
-       free(priv);
-}
-
-static void _show(void *layout_data)
-{
-       struct _priv *priv;
-
-       if (!layout_data)
-               return;
-
-       priv = layout_data;
-
-       evas_object_show(priv->layout);
-       elm_object_part_content_set(priv->base, PART_MENU_LAYOUT, priv->layout);
-}
-
-static void _hide(void *layout_data)
-{
-       struct _priv *priv;
-
-       if (!layout_data)
-               return;
-
-       priv = layout_data;
-
-       evas_object_hide(priv->layout);
-       elm_object_part_content_unset(priv->base, PART_MENU_LAYOUT);
-}
-
-static void _update(void *layout_data, int update_type, void *data)
-{
-}
-
-static layout_class _lclass = {
-       .layout_id = LAYOUT_MENU,
-       .create = _create,
-       .show = _show,
-       .hide = _hide,
-       .destroy = _destroy,
-       .update = _update,
-};
-
-layout_class *layout_menu_get_lclass(void)
-{
-       return &_lclass;
-}
diff --git a/src/layout/movie.c b/src/layout/movie.c
new file mode 100644 (file)
index 0000000..14a8c16
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * 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 <layoutmgr.h>
+
+#include "define.h"
+
+struct _priv {
+       Evas_Object *base;
+       Evas_Object *layout;
+
+       layoutmgr *lmgr;
+};
+
+static bool _create(layoutmgr *lmgr, void *data)
+{
+       struct _priv *priv;
+       Evas_Object *base, *layout;
+
+       if (!lmgr) {
+               _ERR("failed to get layoutmgr");
+               return false;
+       }
+
+       priv = calloc(1, sizeof(*priv));
+       if (!priv) {
+               _ERR("failed to allocate priv");
+               return false;
+       }
+
+       base = layoutmgr_get_base(lmgr);
+       if (!base) {
+               _ERR("failed to get base object");
+               free(priv);
+               return false;
+       }
+
+       layout = elm_layout_add(base);
+       if (!layout) {
+               _ERR("failed to create layout");
+               free(priv);
+               return false;
+       }
+
+       if (!elm_layout_file_set(layout, EDJEFILE, GRP_MOVIE_LAYOUT)) {
+               _ERR("failed to set layout file");
+               evas_object_del(layout);
+               free(priv);
+       }
+
+       priv->base = base;
+       priv->layout = layout;
+       priv->lmgr = lmgr;
+
+       layoutmgr_set_layout_data(lmgr, LAYOUT_MOVIE, priv);
+
+       return true;
+}
+
+static void _destroy(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to get layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_del(priv->layout);
+       free(priv);
+}
+
+static void _show(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_show(priv->layout);
+       elm_object_part_content_set(priv->base,
+                       PART_THUMBNAIL_AREA, priv->layout);
+}
+
+static void _hide(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to get layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_hide(priv->layout);
+       elm_object_part_content_unset(priv->base, PART_THUMBNAIL_AREA);
+}
+
+static void _update(void *layout_data, int update_type, void *data)
+{
+}
+
+static layout_class _lclass = {
+       .layout_id = LAYOUT_MOVIE,
+       .create = _create,
+       .show = _show,
+       .hide = _hide,
+       .destroy = _destroy,
+       .update = _update,
+};
+
+layout_class *layout_movie_get_lclass(void)
+{
+       return &_lclass;
+}
diff --git a/src/layout/music.c b/src/layout/music.c
new file mode 100644 (file)
index 0000000..4a95782
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * 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 <layoutmgr.h>
+
+#include "define.h"
+
+struct _priv {
+       Evas_Object *base;
+       Evas_Object *layout;
+
+       layoutmgr *lmgr;
+};
+
+static bool _create(layoutmgr *lmgr, void *data)
+{
+       struct _priv *priv;
+       Evas_Object *base, *layout;
+
+       if (!lmgr) {
+               _ERR("failed to get layoutmgr");
+               return false;
+       }
+
+       priv = calloc(1, sizeof(*priv));
+       if (!priv) {
+               _ERR("failed to allocate priv");
+               return false;
+       }
+
+       base = layoutmgr_get_base(lmgr);
+       if (!base) {
+               _ERR("failed to get base object");
+               free(priv);
+               return false;
+       }
+
+       layout = elm_layout_add(base);
+       if (!layout) {
+               _ERR("failed to create layout");
+               free(priv);
+               return false;
+       }
+
+       if (!elm_layout_file_set(layout, EDJEFILE, GRP_MUSIC_LAYOUT)) {
+               _ERR("failed to set layout file");
+               evas_object_del(layout);
+               free(priv);
+       }
+
+       priv->base = base;
+       priv->layout = layout;
+       priv->lmgr = lmgr;
+
+       layoutmgr_set_layout_data(lmgr, LAYOUT_MUSIC, priv);
+
+       return true;
+}
+
+static void _destroy(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to get layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_del(priv->layout);
+       free(priv);
+}
+
+static void _show(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_show(priv->layout);
+       elm_object_part_content_set(priv->base,
+                       PART_THUMBNAIL_AREA, priv->layout);
+}
+
+static void _hide(void *layout_data)
+{
+       struct _priv *priv;
+
+       if (!layout_data) {
+               _ERR("failed to get layout data");
+               return;
+       }
+
+       priv = layout_data;
+
+       evas_object_hide(priv->layout);
+       elm_object_part_content_unset(priv->base, PART_THUMBNAIL_AREA);
+}
+
+static void _update(void *layout_data, int update_type, void *data)
+{
+}
+
+static layout_class _lclass = {
+       .layout_id = LAYOUT_MUSIC,
+       .create = _create,
+       .show = _show,
+       .hide = _hide,
+       .destroy = _destroy,
+       .update = _update,
+};
+
+layout_class *layout_music_get_lclass(void)
+{
+       return &_lclass;
+}
index 538d955a0ba1ec6878d73c45be75b4b51931b875..3b01bb55f7cfc0054856be1f253856321556c7ed 100644 (file)
@@ -73,9 +73,7 @@ static bool _create(void *data)
                return false;
        }
 
-       viewmgr_add_view(view_movie_get_vclass(), NULL);
-       viewmgr_add_view(view_gallery_get_vclass(), NULL);
-       viewmgr_add_view(view_music_get_vclass(), NULL);
+       viewmgr_add_view(view_base_get_vclass(), NULL);
        viewmgr_add_view(view_viewer_get_vclass(), NULL);
 
        elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
@@ -97,9 +95,7 @@ static void _terminate(void *data)
 
        ad = data;
 
-       viewmgr_remove_view(VIEW_MOVIE);
-       viewmgr_remove_view(VIEW_GALLERY);
-       viewmgr_remove_view(VIEW_MUSIC);
+       viewmgr_remove_view(VIEW_BASE);
        viewmgr_remove_view(VIEW_VIEWER);
 
        viewmgr_destroy();
@@ -124,7 +120,7 @@ static void _app_control(app_control_h app_control, void *data)
        if (ad->win)
                elm_win_activate(ad->win);
 
-       viewmgr_push_view(VIEW_MOVIE);
+       viewmgr_push_view(VIEW_BASE);
 }
 
 static void _pause(void *data)
diff --git a/src/view/base.c b/src/view/base.c
new file mode 100644 (file)
index 0000000..92d5399
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * 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 <layoutmgr.h>
+
+#include "define.h"
+#include "layout.h"
+
+struct _priv {
+       Evas_Object *win;
+       Evas_Object *base;
+
+       layoutmgr *lmgr;
+};
+
+static Evas_Object *_create(Evas_Object *win, void *data)
+{
+       struct _priv *priv;
+       Evas_Object *base;
+       layoutmgr *lmgr;
+
+       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_BASE_VIEW);
+
+       evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(win, base);
+
+       lmgr = layoutmgr_create(base);
+       layoutmgr_add_layout(lmgr, layout_movie_get_lclass(), NULL);
+       layoutmgr_add_layout(lmgr, layout_gallery_get_lclass(), NULL);
+       layoutmgr_add_layout(lmgr, layout_music_get_lclass(), NULL);
+
+       priv->win = win;
+       priv->base = base;
+       priv->lmgr = lmgr;
+
+       viewmgr_set_view_data(VIEW_BASE, priv);
+
+       return base;
+}
+
+static void _show(void *view_data)
+{
+       struct _priv *priv;
+
+       if (!view_data) {
+               _ERR("failed to get view data");
+               return;
+       }
+
+       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 = 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 = view_data;
+
+       layoutmgr_destroy(priv->lmgr);
+       evas_object_del(priv->base);
+
+       free(priv);
+}
+
+static view_class _vclass = {
+       .view_id = VIEW_BASE,
+       .create = _create,
+       .show = _show,
+       .hide = _hide,
+       .destroy = _destroy,
+};
+
+view_class *view_base_get_vclass(void)
+{
+       return &_vclass;
+}
diff --git a/src/view/gallery.c b/src/view/gallery.c
deleted file mode 100644 (file)
index 970ca82..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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 <layoutmgr.h>
-
-#include "define.h"
-#include "layout.h"
-
-struct _priv {
-       Evas_Object *win;
-       Evas_Object *base;
-
-       layoutmgr *lmgr;
-};
-
-static Evas_Object *_create(Evas_Object *win, void *data)
-{
-       struct _priv *priv;
-       Evas_Object *base;
-       layoutmgr *lmgr;
-
-       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_GALLERY_VIEW);
-
-       evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_win_resize_object_add(win, base);
-
-       lmgr = layoutmgr_create(base);
-       layoutmgr_add_layout(lmgr, layout_menu_get_lclass(), NULL);
-       layoutmgr_show_layout(lmgr, LAYOUT_MENU);
-
-       priv->win = win;
-       priv->base = base;
-       priv->lmgr = lmgr;
-
-       viewmgr_set_view_data(VIEW_GALLERY, priv);
-
-       return base;
-}
-
-static void _show(void *view_data)
-{
-       struct _priv *priv;
-
-       if (!view_data) {
-               _ERR("failed to get view data");
-               return;
-       }
-
-       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 = 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 = view_data;
-
-       layoutmgr_destroy(priv->lmgr);
-       evas_object_del(priv->base);
-
-       free(priv);
-}
-
-static view_class _vclass = {
-       .view_id = VIEW_GALLERY,
-       .create = _create,
-       .show = _show,
-       .hide = _hide,
-       .destroy = _destroy,
-};
-
-view_class *view_gallery_get_vclass(void)
-{
-       return &_vclass;
-}
diff --git a/src/view/movie.c b/src/view/movie.c
deleted file mode 100644 (file)
index 4e82af6..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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 <layoutmgr.h>
-
-#include "define.h"
-#include "layout.h"
-
-struct _priv {
-       Evas_Object *win;
-       Evas_Object *base;
-
-       layoutmgr *lmgr;
-};
-
-static Evas_Object *_create(Evas_Object *win, void *data)
-{
-       struct _priv *priv;
-       Evas_Object *base;
-       layoutmgr *lmgr;
-
-       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_MOVIE_VIEW);
-
-       evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_win_resize_object_add(win, base);
-
-       lmgr = layoutmgr_create(base);
-       layoutmgr_add_layout(lmgr, layout_menu_get_lclass(), NULL);
-       layoutmgr_show_layout(lmgr, LAYOUT_MENU);
-
-       priv->win = win;
-       priv->base = base;
-       priv->lmgr = lmgr;
-
-       viewmgr_set_view_data(VIEW_MOVIE, priv);
-
-       return base;
-}
-
-static void _show(void *view_data)
-{
-       struct _priv *priv;
-
-       if (!view_data) {
-               _ERR("failed to get view data");
-               return;
-       }
-
-       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 = 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 = view_data;
-
-       layoutmgr_destroy(priv->lmgr);
-       evas_object_del(priv->base);
-
-       free(priv);
-}
-
-static view_class _vclass = {
-       .view_id = VIEW_MOVIE,
-       .create = _create,
-       .show = _show,
-       .hide = _hide,
-       .destroy = _destroy,
-};
-
-view_class *view_movie_get_vclass(void)
-{
-       return &_vclass;
-}
diff --git a/src/view/music.c b/src/view/music.c
deleted file mode 100644 (file)
index 4280f66..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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 <layoutmgr.h>
-
-#include "define.h"
-#include "layout.h"
-
-struct _priv {
-       Evas_Object *win;
-       Evas_Object *base;
-
-       layoutmgr *lmgr;
-};
-
-static Evas_Object *_create(Evas_Object *win, void *data)
-{
-       struct _priv *priv;
-       Evas_Object *base;
-       layoutmgr *lmgr;
-
-       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_MUSIC_VIEW);
-
-       evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_win_resize_object_add(win, base);
-
-       lmgr = layoutmgr_create(base);
-       layoutmgr_add_layout(lmgr, layout_menu_get_lclass(), NULL);
-       layoutmgr_show_layout(lmgr, LAYOUT_MENU);
-
-       priv->win = win;
-       priv->base = base;
-       priv->lmgr = lmgr;
-
-       viewmgr_set_view_data(VIEW_MUSIC, priv);
-
-       return base;
-}
-
-static void _show(void *view_data)
-{
-       struct _priv *priv;
-
-       if (!view_data) {
-               _ERR("failed to get view data");
-               return;
-       }
-
-       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 = 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 = view_data;
-
-       layoutmgr_destroy(priv->lmgr);
-       evas_object_del(priv->base);
-
-       free(priv);
-}
-
-static view_class _vclass = {
-       .view_id = VIEW_MUSIC,
-       .create = _create,
-       .show = _show,
-       .hide = _hide,
-       .destroy = _destroy,
-};
-
-view_class *view_music_get_vclass(void)
-{
-       return &_vclass;
-}