--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * 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 __TIZEN_FRAME_COMPONENT_INTERNAL_H__
+#define __TIZEN_FRAME_COMPONENT_INTERNAL_H__
+
+#include <Elementary.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int frame_component_get_resource_id(Evas_Object *win, int *res_id);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __TIZEN_FRAME_COMPONENT_INTERNAL_H__ */
+
#include <glib.h>
#include <unistd.h>
#include <app_control_internal.h>
+#include <Ecore_Wl2.h>
#include <list>
const_cast<component_based::ElmWindow*>(win);
*window = static_cast<Evas_Object*>(elm_win->GetRaw());
+ return COMPONENT_ERROR_NONE;
+}
+
+extern "C" EXPORT_API int frame_component_get_resource_id(Evas_Object* win,
+ int* res_id) {
+ if (win == nullptr || res_id == nullptr) {
+ LOGE("Invalid parameter");
+ return COMPONENT_ERROR_INVALID_PARAMETER;
+ }
+ Evas* evas = evas_object_evas_get(win);
+ if (evas == nullptr) {
+ LOGE("Invalid parameter");
+ return COMPONENT_ERROR_INVALID_PARAMETER;
+ }
+
+ Ecore_Evas* ecore_evas = ecore_evas_ecore_evas_get(evas);
+ if (ecore_evas == nullptr) {
+ LOGE("Invalid parameter");
+ return COMPONENT_ERROR_INVALID_PARAMETER;
+ }
+
+ Ecore_Wl2_Window* wl_win = ecore_evas_wayland2_window_get(ecore_evas);
+ if (wl_win == nullptr) {
+ LOGE("Invalid parameter");
+ return COMPONENT_ERROR_INVALID_PARAMETER;
+ }
+
+ *res_id = ecore_wl2_window_id_get(wl_win);
return COMPONENT_ERROR_NONE;
}
\ No newline at end of file