2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file view_logic_get_parent_window_util.h
18 * @author Tae-Jeong Lee (taejeong.lee@samsung.com)
21 #ifndef VIEW_LOGIC_GET_PARENT_WINDOW_UTIL_H_
22 #define VIEW_LOGIC_GET_PARENT_WINDOW_UTIL_H_
24 #include <Elementary.h>
25 #include <dpl/log/log.h>
27 namespace ViewModule {
30 static Evas_Object* getParentWindow(Evas_Object* object)
32 Evas_Object* parent = elm_object_parent_widget_get(object);
33 Evas_Object* win = parent;
36 const char* type = elm_object_widget_type_get(parent);
38 if (!strncmp(type, "elm_win", strlen("elm_win"))) {
43 parent = elm_object_parent_widget_get(parent);
48 LogError("Parent window was not found!");
55 } //namespace ViewModule
56 } //namespace PopupUtil
57 #endif //VIEW_LOGIC_GET_PARENT_WINDOW_UTIL_H_