File: XnaGameWindowImpl.cs

package info (click to toggle)
monogame 2.5.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,060 kB
  • ctags: 10,325
  • sloc: cs: 65,996; xml: 591; makefile: 22; ansic: 8
file content (71 lines) | stat: -rw-r--r-- 1,898 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace Microsoft.Xna.Framework
{
    internal class XnaGameWindowImpl : GameWindow
    {
        internal AndroidGameWindow nativeWindow;

        public XnaGameWindowImpl(Activity context, Game game)
        {
            nativeWindow = new AndroidGameWindow(context, game);
        }

        public override void BeginScreenDeviceChange(bool willBeFullScreen)
        {
            throw new NotImplementedException();
        }

        public override void EndScreenDeviceChange(string screenDeviceName, int clientWidth, int clientHeight)
        {
            throw new NotImplementedException();
        }

        public override bool AllowUserResizing
        {
            get { return false; }
            set { }
        }

        public override Rectangle ClientBounds
        {
            get { return nativeWindow.ClientBounds; }
        }

        public override DisplayOrientation CurrentOrientation
        {
            get { return nativeWindow.CurrentOrientation; }
        }

        public override IntPtr Handle
        {
            get { return nativeWindow.Handle; }
        }

        public override string ScreenDeviceName
        {
            get { return string.Empty; }
        }

        protected override void SetTitle(string title)
        {
            nativeWindow.Title = title;
        }

        // FIXME: Implement SetSupportedOrientations
        protected internal override void SetSupportedOrientations(DisplayOrientation orientations)
        {
            Console.WriteLine("Android needs to implement GameWindow.SetSupportedOrientations!");
        }
    }
}