Chun : initial version
authorJin Yoon <jinny.yoon@samsung.com>
Sat, 8 Aug 2015 06:30:25 +0000 (15:30 +0900)
committerJin Yoon <jinny.yoon@samsung.com>
Sat, 8 Aug 2015 06:30:25 +0000 (15:30 +0900)
chun/Makefile [new file with mode: 0755]
chun/img/add_btn.png [new file with mode: 0644]
chun/img/floting_next_button.png [new file with mode: 0755]
chun/img/next_btn.png [new file with mode: 0644]
chun/img/searchlist.png [new file with mode: 0755]
chun/img/world_map.png [new file with mode: 0755]
chun/main.c [new file with mode: 0755]
chun/main.edc [new file with mode: 0755]
chun/main.edj [new file with mode: 0644]
chun/main.o [new file with mode: 0755]
chun/momentic [new file with mode: 0755]

diff --git a/chun/Makefile b/chun/Makefile
new file mode 100755 (executable)
index 0000000..a8d5724
--- /dev/null
@@ -0,0 +1,20 @@
+CFLAGS += $(shell pkg-config --cflags elementary evas ecore ecore-input)
+LIBS += $(shell pkg-config --libs elementary evas ecore ecore-input)
+CFLAGS += -Wall -O2 -g
+
+BINARY=momentic
+
+PREFIX=/usr/local
+BINDIR=$(PREFIX)/bin
+
+$(BINARY): main.o
+       $(CC) -o $@ $< $(LIBS)
+
+install: $(BINARY)
+       @echo "installation of $(BINARY)"
+       @mkdir -p $(BINDIR)
+       @install -m 0755 $(BINARY) $(BINDIR)
+
+clean:
+       rm -f $(BINARY) main.o
+
diff --git a/chun/img/add_btn.png b/chun/img/add_btn.png
new file mode 100644 (file)
index 0000000..86e8658
Binary files /dev/null and b/chun/img/add_btn.png differ
diff --git a/chun/img/floting_next_button.png b/chun/img/floting_next_button.png
new file mode 100755 (executable)
index 0000000..d6ef24a
Binary files /dev/null and b/chun/img/floting_next_button.png differ
diff --git a/chun/img/next_btn.png b/chun/img/next_btn.png
new file mode 100644 (file)
index 0000000..86e8658
Binary files /dev/null and b/chun/img/next_btn.png differ
diff --git a/chun/img/searchlist.png b/chun/img/searchlist.png
new file mode 100755 (executable)
index 0000000..bf751b8
Binary files /dev/null and b/chun/img/searchlist.png differ
diff --git a/chun/img/world_map.png b/chun/img/world_map.png
new file mode 100755 (executable)
index 0000000..3f50872
Binary files /dev/null and b/chun/img/world_map.png differ
diff --git a/chun/main.c b/chun/main.c
new file mode 100755 (executable)
index 0000000..d8c0052
--- /dev/null
@@ -0,0 +1,31 @@
+#include <Elementary.h>
+
+#define SCRN_W 480
+#define SCRN_H 800
+
+int
+elm_main(int argc, char **argv)
+{
+   elm_config_accel_preference_set("3d");
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+
+   //create a main window
+   Evas_Object *win = elm_win_util_standard_add("Momentic", "Momentic");
+   elm_win_autodel_set(win, EINA_TRUE);
+
+   //create a overlay
+   Evas_Object *main_layout = elm_layout_add(win);
+   elm_layout_file_set(main_layout, "main.edj", "main");
+   evas_object_size_hint_weight_set(main_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(main_layout);
+   elm_win_resize_object_add(win, main_layout);
+
+   evas_object_resize(win, SCRN_W, SCRN_H);
+   evas_object_show(win);
+
+   elm_run();
+   elm_shutdown();
+
+   return 0;
+}
+ELM_MAIN()
diff --git a/chun/main.edc b/chun/main.edc
new file mode 100755 (executable)
index 0000000..3599d37
--- /dev/null
@@ -0,0 +1,285 @@
+collections {
+   styles {
+      style { "text_style";
+         base: "font=Tizen font_size=18 text_class=entry color=#646261 valign=0.5 align=center";
+      }
+   }
+   images {
+      image: "world_map.png" COMP;
+      image: "add_btn.png" COMP;
+      image: "next_btn.png" COMP;
+      image: "searchlist.png" COMP;
+   }
+   group { "main";
+      parts {
+         rect { "base";
+            desc { "default";
+            }
+         }
+         rect { "map_base";
+            desc { "default";
+               rel2.relative: 1 0.51;
+               color: 246 243 243 255;
+            }
+         }
+         image { "map";
+            scale:1 ;
+            desc { "default";
+               rel1.to: "map_base";
+               rel2.to: "map_base";
+               rel1.relative: 0.0 0.27;
+               rel2.relative: 1.0 0.90;
+               image.normal: "world_map.png";
+            }
+            desc { "next";
+               inherit: "default";
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 1.0 0.4;
+            }
+         }
+// Init
+         rect { "add_dim";
+            desc { "default";
+               rel1.to: "map_base";
+               rel2.to: "map_base";
+               color: 0 0 0 50;
+            }
+            desc { "next";
+               inherit: "default";
+               color: 0 0 0 0;
+            }
+         }
+         image { "add_btn";
+            scale: 1;
+            desc { "default";
+               rel1.to: "map_base";
+               rel2.to: "map_base";
+               rel1.relative: 0.5 0.4;
+               rel2.relative: 0.5 0.4;
+               align: 0.5 0.5;
+               min: 54 54;
+               fixed: 1 1;
+               image.normal: "add_btn.png";
+               color: 255 255 255 255;
+            }
+            desc { "visible";
+               inherit: "default";
+               rel1.relative: 0.5 0.35;
+               rel2.relative: 0.5 0.35;
+               color: 255 255 255 255;
+            }
+            desc { "next";
+               inherit: "visible";
+               min: 84 84;
+               color: 255 255 255 0;
+            }
+         }
+         textblock { "add_desc";
+            scale: 1;
+            desc { "default";
+               rel1.to: "map_base";
+               rel2.to: "map_base";
+               rel1.relative: 0.0 0.5;
+               rel2.relative: 1.0 0.5;
+               fixed: 1 1;
+               align: 0 0;
+               text {
+                  text: "<b>Add cities,<br>To find best time for your chat.";
+                  style: "text_style";
+                  min: 0 1;
+               }
+               color: 255 255 255 0;
+            }
+            desc { "visible";
+               inherit: "default";
+               rel1.relative: 0.0 0.45;
+               rel2.relative: 1.0 0.45;
+               color: 255 255 255 255;
+            }
+            desc { "next";
+               inherit: "visible";
+               color: 255 255 255 0;
+            }
+         }
+         rect{ "current_city";
+            scale: 1;
+            desc { "default";
+               rel1.relative: 0 0.51;
+               rel2.relative: 1 0.6;
+               color: 0 0 255 255;
+            }
+         }
+         textblock { "add_desc2";
+            scale: 1;
+            desc { "default";
+               rel1.relative: 0 0.6;
+               text {
+                  text: "<b>After you add cities,<br>they will be shown here.";
+                  style: "text_style";
+                  min: 0 1;
+               }
+            }
+         }
+// page 1
+         image { "searchlist";
+            scale: 1;
+            desc { "default";
+               rel1.to: "searchbar";
+               rel2.to_x: "searchbar";
+               rel2.relative: 1 0;
+               image.normal: "searchlist.png";
+               image.border: 10 10 10 10;
+               image.border_scale: 1;
+            }
+            desc { "visible";
+               inherit: "default";
+               rel2.to_y: "map";
+               rel2.relative: 1 0.5;
+            }
+         }
+         rect { "searchbar";
+            scale: 1;
+            desc { "default";
+               rel1.relative: 0.03 0.015;
+               rel2.relative: 0.97 0.015;
+               min: 0 35;
+               align: 0.5 0;
+               fixed: 1 1;
+               visible: 0;
+            }
+            desc { "visible";
+               inherit: "default";
+               visible: 1;
+            }
+         }
+         image{ "next_btn";
+            scale: 1;
+            desc { "default";
+               rel1.to: "map";
+               rel2.to: "map";
+               rel1.relative: 0.9 0.8;
+               rel2.relative: 0.9 0.8;
+               min: 60 60;
+               fixed: 1 1;
+               color: 255 255 255 0;
+               align: 1 0.5;
+               image.normal: "next_btn.png";
+            }
+            desc { "visible";
+               inherit: "default";
+               rel1.relative: 0.95 0.8;
+               rel2.relative: 0.95 0.8;
+               color: 255 255 255 255;
+            }
+         }
+         swallow { "selected_list";
+            scale: 1;
+            desc { "default";
+               rel1.relative: 0.0 1.0;
+               rel2.relative: 1.0 1.0;
+               rel1.to: "map";
+            }
+         }
+      }
+      programs {
+         program { "start";
+            signal: "load";
+            source: "";
+            action: STATE_SET "visible";
+            target: "add_btn";
+            target: "add_desc";
+            transition: DECELERATE 1;
+         }
+         program { "page1";
+            signal: "momentic,state,page1";
+            source: "";
+            script {
+               run_program(PROGRAM:"go_page1");
+               run_program(PROGRAM:"go_page2");
+            }
+         }
+         
+         //page 1 start
+         program { "go_page1";
+            action: STATE_SET "next";
+            target: "add_btn";
+            target: "add_desc";
+            target: "add_dim";
+            transition: DECELERATE 0.25;
+         }
+         program { "go_page2";
+            action: STATE_SET "visible";
+            target: "searchbar";
+         }
+         //page 1 end
+         
+         //search bar start
+         program { "show_searchbar";
+            signal: "momentic,state,searchbar,show";
+            source: "";
+            action: STATE_SET "visible";
+            target: "searchbar";
+         }
+         program { "hide_searchbar";
+            signal: "momentic,state,searchbar,hide";
+            source: "";
+            action: STATE_SET "default";
+            target: "searchbar";
+         }
+         program { "show_searchlist";
+            signal: "momentic,state,searchlist,show";
+            source: "";
+            action: STATE_SET "visible";
+            target: "searchlist";
+            transition: DECELERATE 0.5;
+         }
+         program { "hide_searchlist";
+            signal: "momentic,state,searchlist,hide";
+            source: "";
+            action: STATE_SET "default";
+            target: "searchlist";
+            transition: DECELERATE 0.5;
+         }
+         //search bar end      
+         
+         program { "go_next_page";
+            signal: "momentic,state,next_page";
+            source: "";
+            script {
+               run_program(PROGRAM:"map_next");
+            }
+         }
+         program { "map_next";
+            action: STATE_SET "next";
+            target: "map";
+            transition: LINEAR 0.5;
+         }
+         program { "go_prev_page";
+            signal: "momentic,state,prev_page";
+            source: "";
+            action: STATE_SET "default";
+            target: "map";
+            transition: LINEAR 0.5;
+         }
+         program { "map_prev ";
+            action: STATE_SET "next";
+            target: "map";
+            transition: LINEAR 0.5;
+         }
+         program { "next_btn_show";
+            signal: "momentic,state,next_btn,show";
+            source: "";
+            action: STATE_SET "visible";
+            target: "next_btn";
+            transition: DECELERATE 0.75;
+         }
+         program { "next_btn_hide";
+            signal: "momentic,state,next_btn,hide";
+            source: "";
+            action: STATE_SET "default";
+            target: "next_btn";
+            transition: DECELERATE 0.75;
+         }
+      }
+   }
+}
diff --git a/chun/main.edj b/chun/main.edj
new file mode 100644 (file)
index 0000000..e89521e
Binary files /dev/null and b/chun/main.edj differ
diff --git a/chun/main.o b/chun/main.o
new file mode 100755 (executable)
index 0000000..f5cb77b
Binary files /dev/null and b/chun/main.o differ
diff --git a/chun/momentic b/chun/momentic
new file mode 100755 (executable)
index 0000000..1ff7212
Binary files /dev/null and b/chun/momentic differ