From: Hermet Park Date: Thu, 18 Feb 2016 12:06:02 +0000 (+0900) Subject: clear code and update copyrights X-Git-Tag: submit/tizen/20160617.075742~140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3aeff1790890e1f48633a3a8f3208219537fd57;p=platform%2Fcore%2Fuifw%2Fui-viewmgr.git clear code and update copyrights Change-Id: I5e7e2da89d3266c2a6318786d00259858bedab81 --- diff --git a/AUTHORS b/AUTHORS index 2bb03d8..66fe17e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,2 @@ -Chuneon Park +Hermet Park Woochan Lee diff --git a/inc/main.h b/inc/main.h index 4cf5095..9624a71 100644 --- a/inc/main.h +++ b/inc/main.h @@ -1,19 +1,19 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2016 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 + * 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 + * 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. * - * 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 #include diff --git a/src/efl/efl_viewmgr.h b/src/efl/efl_viewmgr.h index 7dc04b2..7a6c43b 100644 --- a/src/efl/efl_viewmgr.h +++ b/src/efl/efl_viewmgr.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 "ui_viewmgr.h" #include "ui_controller.h" #include "ui_view.h" diff --git a/src/efl/mobile/efl_viewmgr.h b/src/efl/mobile/efl_viewmgr.h index b2389bd..23fb3c3 100644 --- a/src/efl/mobile/efl_viewmgr.h +++ b/src/efl/mobile/efl_viewmgr.h @@ -1 +1,17 @@ +/* + * Copyright (c) 2016 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 "ui_basic_view.h" diff --git a/src/efl/mobile/ui_basic_view.cpp b/src/efl/mobile/ui_basic_view.cpp index 64b32d5..20e62bd 100644 --- a/src/efl/mobile/ui_basic_view.cpp +++ b/src/efl/mobile/ui_basic_view.cpp @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 "efl_viewmgr.h" using namespace efl; diff --git a/src/efl/mobile/ui_basic_view.h b/src/efl/mobile/ui_basic_view.h index 9104886..cbefb47 100644 --- a/src/efl/mobile/ui_basic_view.h +++ b/src/efl/mobile/ui_basic_view.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 UI_BASIC_VIEW #define UI_BASIC_VIEW diff --git a/src/efl/ui_controller.cpp b/src/efl/ui_controller.cpp index d195cc0..58e56f1 100644 --- a/src/efl/ui_controller.cpp +++ b/src/efl/ui_controller.cpp @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2016 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 "efl_viewmgr.h" using namespace efl; -ui_view * -ui_controller::get_view() +ui_view * ui_controller::get_view() { ui_view_base *view = ui_controller_base::get_view(); if (!view) return NULL; diff --git a/src/efl/ui_controller.h b/src/efl/ui_controller.h index d9de73e..9f032ae 100644 --- a/src/efl/ui_controller.h +++ b/src/efl/ui_controller.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 UI_CONTROLLER #define UI_CONTROLLER diff --git a/src/efl/ui_view.cpp b/src/efl/ui_view.cpp index 4f0dda0..6ae7399 100644 --- a/src/efl/ui_view.cpp +++ b/src/efl/ui_view.cpp @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 "efl_viewmgr.h" using namespace efl; diff --git a/src/efl/ui_view.h b/src/efl/ui_view.h index 51ffd62..3ec530d 100644 --- a/src/efl/ui_view.h +++ b/src/efl/ui_view.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 UI_VIEW #define UI_VIEW diff --git a/src/efl/ui_viewmgr.cpp b/src/efl/ui_viewmgr.cpp index 8e0bc2d..dd7e4bf 100644 --- a/src/efl/ui_viewmgr.cpp +++ b/src/efl/ui_viewmgr.cpp @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 "efl_viewmgr.h" using namespace efl; diff --git a/src/efl/ui_viewmgr.h b/src/efl/ui_viewmgr.h index c76a2ce..4bb9273 100644 --- a/src/efl/ui_viewmgr.h +++ b/src/efl/ui_viewmgr.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 UI_VIEWMGR #define UI_VIEWMGR diff --git a/src/interface/ui_controller_base.cpp b/src/interface/ui_controller_base.cpp index b751a22..1fa7901 100644 --- a/src/interface/ui_controller_base.cpp +++ b/src/interface/ui_controller_base.cpp @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 "ui_viewmgr.h" void ui_controller_base::set_view(ui_view_base *view) diff --git a/src/interface/ui_controller_base.h b/src/interface/ui_controller_base.h index d48ba7c..b4902c2 100644 --- a/src/interface/ui_controller_base.h +++ b/src/interface/ui_controller_base.h @@ -1,11 +1,19 @@ /* - * ui_controller_base.h + * Copyright (c) 2016 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. * - * Created on: Jan 15, 2016 - * Author: Hermet Park - * Author: woochan lee */ - #ifndef UI_CONTROLLER_BASE_H_ #define UI_CONTROLLER_BASE_H_ diff --git a/src/interface/ui_view_base.cpp b/src/interface/ui_view_base.cpp index 4c6e4dd..1d0ed03 100644 --- a/src/interface/ui_view_base.cpp +++ b/src/interface/ui_view_base.cpp @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 "ui_viewmgr.h" void ui_view_base::set_event_block(bool block) diff --git a/src/interface/ui_view_base.h b/src/interface/ui_view_base.h index 5280e7d..d7b5cd2 100644 --- a/src/interface/ui_view_base.h +++ b/src/interface/ui_view_base.h @@ -1,11 +1,19 @@ /* - * ui_view_base.h + * Copyright (c) 2016 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. * - * Created on: Jan 15, 2016 - * Author: Hermet Park - * Author: woochan lee */ - #ifndef UI_VIEW_BASE_H_ #define UI_VIEW_BASE_H_ diff --git a/src/interface/ui_viewmgr.h b/src/interface/ui_viewmgr.h index 3a96621..512525f 100644 --- a/src/interface/ui_viewmgr.h +++ b/src/interface/ui_viewmgr.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 diff --git a/src/interface/ui_viewmgr_base.cpp b/src/interface/ui_viewmgr_base.cpp index 34ef0a0..a72906e 100644 --- a/src/interface/ui_viewmgr_base.cpp +++ b/src/interface/ui_viewmgr_base.cpp @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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 "ui_viewmgr.h" bool ui_viewmgr_base::_connect_view(ui_view_base *view) diff --git a/src/interface/ui_viewmgr_base.h b/src/interface/ui_viewmgr_base.h index 1b3d676..772e7ea 100644 --- a/src/interface/ui_viewmgr_base.h +++ b/src/interface/ui_viewmgr_base.h @@ -1,11 +1,19 @@ /* - * ui_viewmgr_base.h + * Copyright (c) 2016 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. * - * Created on: Jan 15, 2016 - * Author: Hermet Park - * Author: woochan lee */ - #ifndef UI_WINDOW_BASE_H_ #define UI_WINDOW_BASE_H_ diff --git a/src/main.cpp b/src/main.cpp index 2288b7b..368fd3b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2016 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. @@ -14,7 +14,6 @@ * limitations under the License. * */ - #include "main.h" #include "page4_controller.h" #include "page3_controller.h" @@ -68,7 +67,7 @@ static void create_base_gui(appdata_s *ad) //FIXME: Hide this creation. ad->viewmgr = new ui_viewmgr(PACKAGE); - page1_controller *page1 = new page1_controller(ad); + page1(ad); ad->viewmgr->activate(); } diff --git a/src/page1_controller.h b/src/page1_controller.h index 2cc33a0..031eed6 100644 --- a/src/page1_controller.h +++ b/src/page1_controller.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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. + * + */ class page1_controller: public ui_controller { private: @@ -31,9 +47,15 @@ public: [](void *data, Evas_Object *obj, void *event_info) -> void { appdata_s *ad = static_cast(data); - page2_controller *controller = new page2_controller(ad); - }, this->ad); + page2(ad); + }, + this->ad); view->set_content(content, "Title"); } }; + +void page1(appdata_s *ad) +{ + new page1_controller(ad); +} diff --git a/src/page2_controller.h b/src/page2_controller.h index 64c2eac..a1ee6d8 100644 --- a/src/page2_controller.h +++ b/src/page2_controller.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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. + * + */ class page2_controller: public ui_controller { private: @@ -31,8 +47,9 @@ public: [](void *data, Evas_Object *obj, void *event_info) -> void { appdata_s *ad = static_cast(data); - page3_controller *controller = new page3_controller(ad); - }, this->ad); + page3(ad); + }, + this->ad); //Title left button Evas_Object *left_title_btn = elm_button_add(view->get_base()); @@ -46,3 +63,8 @@ public: view->set_content(content, "Title Buttons", NULL, NULL, left_title_btn, right_title_btn); } }; + +void page2(appdata_s *ad) +{ + new page2_controller(ad); +} diff --git a/src/page3_controller.h b/src/page3_controller.h index 3726c18..0eebfe4 100644 --- a/src/page3_controller.h +++ b/src/page3_controller.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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. + * + */ class page3_controller: public ui_controller { private: @@ -32,10 +48,16 @@ public: [](void *data, Evas_Object *obj, void *event_info) -> void { appdata_s *ad = static_cast(data); - page4_controller *controller = new page4_controller(ad); - }, this->ad); + page4(ad); + }, + this->ad); //Arguments: content, title, subtitle, icon, title left button, title right button view->set_content(content, "Title", "Subtitle", NULL, NULL, NULL); } }; + +void page3(appdata_s *ad) +{ + new page3_controller(ad); +} diff --git a/src/page4_controller.h b/src/page4_controller.h index 268ec63..17a5aec 100644 --- a/src/page4_controller.h +++ b/src/page4_controller.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 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. + * + */ class page4_controller: public ui_controller { private: @@ -40,3 +56,8 @@ public: view->set_title_badge("999+"); } }; + +void page4(appdata_s *ad) +{ + new page4_controller(ad); +}