1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#include "glfw_render_context.h"
17#include "MockGlobalResult.h"
18
19namespace OHOS::Rosen {
20std::shared_ptr<GlfwRenderContext> GlfwRenderContext::GetGlobal()
21{
22    if (!global_) {
23        global_ = std::make_shared<GlfwRenderContext>();
24    }
25    return global_;
26}
27
28int GlfwRenderContext::Init()
29{
30    g_glfwInit = true;
31    return 1;
32}
33
34int GlfwRenderContext::CreateGlfwWindow(int32_t width, int32_t height, bool visible)
35{
36    g_createGlfwWindow = true;
37    return 1;
38}
39
40void GlfwRenderContext::DestroyWindow()
41{
42    g_destroyWindow = true;
43}
44
45void GlfwRenderContext::Terminate()
46{
47    g_terminate = true;
48}
49
50void GlfwRenderContext::PollEvents()
51{
52    g_pollEvents = true;
53}
54
55void GlfwRenderContext::SetWindowSize(int32_t width, int32_t height) {}
56}