2 * Copyright (c) 2015 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 #ifndef XWALK_RUNTIME_BROWSER_SPLASH_SCREEN_H_
18 #define XWALK_RUNTIME_BROWSER_SPLASH_SCREEN_H_
26 #include <Elementary.h>
28 #include "runtime/browser/native_window.h"
29 #include "wgt_manifest_handlers/splash_screen_handler.h"
35 typedef std::pair<int, int> SplashScreenBound;
36 enum class HideReason { RENDERED, LOADFINISHED, CUSTOM };
38 SplashScreen(NativeWindow* window,
39 std::shared_ptr<const wgt::parse::SplashScreenInfo> ss_info,
40 const std::string& app_path);
41 void HideSplashScreen(HideReason reason);
44 std::pair<int, int> GetDimensions();
45 void SetBackground(const wgt::parse::SplashScreenData& splash_data,
46 Evas_Object* parent, const SplashScreenBound& bound,
47 const std::string& app_path);
49 void SetImage(const wgt::parse::SplashScreenData& splash_data,
50 Evas_Object* parent, const SplashScreenBound& bound,
51 const std::string& app_path);
53 std::shared_ptr<const wgt::parse::SplashScreenInfo> ss_info_;
54 NativeWindow* window_;
56 Evas_Object* background_;
57 Evas_Object* background_image_;
60 } // namespace runtime
61 #endif // XWALK_RUNTIME_BROWSER_SPLASH_SCREEN_H_