A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using System;
5using System.Collections.Generic;
6using osu.Framework.Configuration;
7using osu.Framework.Platform;
8using osuTK;
9using osuTK.Graphics;
10
11namespace osu.Framework.Android
12{
13 public class AndroidGameWindow : OsuTKWindow
14 {
15 private readonly AndroidGameView view;
16
17 public override IGraphicsContext Context => view.GraphicsContext;
18
19 public override bool Focused => true;
20
21 public override Platform.WindowState WindowState
22 {
23 get => Platform.WindowState.Normal;
24 set { }
25 }
26
27 public AndroidGameWindow(AndroidGameView view)
28 : base(view)
29 {
30 this.view = view;
31 }
32
33 public override void SetupWindow(FrameworkConfigManager config)
34 {
35 }
36
37 protected override IEnumerable<WindowMode> DefaultSupportedWindowModes => new[]
38 {
39 Configuration.WindowMode.Fullscreen,
40 };
41
42 public override void Run()
43 {
44 view.Run();
45 }
46
47 protected override DisplayDevice CurrentDisplayDevice
48 {
49 get => DisplayDevice.Default;
50 set => throw new InvalidOperationException();
51 }
52 }
53}